开发者

How to rewrite URL for user profile in .htaccess

My user profile URL 开发者_Python百科looks like this: http://mysite.com/profile.php?user=Rango and I want to make it like: http://mysite.com/Rango

Maybe somebody can help with an example? Thank you very much.


RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /profile.php?user=$1 [L,QSA]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜