htaccess in php
I am using htaccess in my projec.there is login section i want to show the my account page as http:///www/domain.com/username . But there is a problem because i have also开发者_JAVA技巧 made a cms which is open as http:///www/domain.com/cms . Although i have validate the user name But there is same page open when i open the cms or user profile page. I have pass the regular expression in htaccess but stil not required result is come
If http://www.domain.com is hosted in /path/to/site/ and http://www.domain.com/cms in /path/to/site/cms/ then this should work :
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z]*)$ %{SCRIPT_URL}index.php?username=$1
精彩评论