Committer: vad
LJSV-2107: Some users cannot view their entries, get 'page not found' messageU trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm =================================================================== --- trunk/cgi-bin/Apache/LiveJournal.pm 2012-03-21 13:35:28 UTC (rev 21492) +++ trunk/cgi-bin/Apache/LiveJournal.pm 2012-03-21 14:04:58 UTC (rev 21493) @@ -393,7 +393,10 @@ my $journal_base = $u->journal_base(); my $username = $u->username; if ($username !~ /(^_)|(_$)/){ - $uri =~ s!^/$username(/|$)!/!; + my $username_re = $username; + $username_re =~ s/[-_]/[-_]/g; + $uri =~ s!^/$username_re(/|$)!/!; ## /user-name/ and /user_name/; + return redir("$journal_base$uri$args_wq", LJ::Request::HTTP_MOVED_PERMANENTLY()); } }