重写,我发现关于URL重写一些问题: .htaccess: Problem with URL rewriting或 .htaccess question - URL-rewriting网址的.htaccess
我想他们的方法,但不工作在我的情况? 矿看起来很简单:
http://example.org.uk/member/home.php?profile --> http://example.org.uk/member/home/profile/
http://example.org.uk/member/home.php?history --> http://example.org.uk/member/home/history/
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^home/([0-9][0-9])/$ /home.php?$1
RewriteRule ^/([^/]+).php$ /home.php?$1 [L]
任何thougt是appricated?谢谢
您的规则和示例相互矛盾。你想把`home.php?profile`映射到`home/profile`(例子)还是`home/profile`被重写为`home.php?profile`(重写代码)? – 2011-01-28 17:53:26
@Linus:我想映射到家庭/配置文件,并删除PHP前。 – tonoslfx 2011-01-28 17:54:45