php - .htaccess rewrite for user profile page does not work -
i have problem htacces file , thing trying profile url ex : www.mysite.com/profilename --> link take me user profile , working because of
rewriteengine on rewriterule ^([a-za-z0-9_-]+)$ profile.php?u=$1 rewriterule ^([a-za-z0-9_-]+)/$ profile.php?u=$1
no thing whenever seek access other directory illustration www.mysite.com/login changes url www.mysite.com/login/u?=login
depending on if login
actual file or directory rather script needing htaccess rule.
rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f
this checks first see if directory or file exists before executing rewriterule
directive.
php .htaccess
No comments:
Post a Comment