我有网址缩短URL htaccess文件
www.example.com/profile?username=abc
,我想重写为
www.example.com/abc
我怎样才能做到这一点使用htaccess的?
我有网址缩短URL htaccess文件
www.example.com/profile?username=abc
,我想重写为
www.example.com/abc
我怎样才能做到这一点使用htaccess的?
的RewriteCond避免无穷的重定向
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/profile
RewriteRule ^(.*)$ /profile?username=$1
的[foo.com/alice对可能重复foo.com/users/alice](http://stackoverflow.com/questions/780311/foo-com -alice-vs-foo-com-users-alice) –