我目前的网址:http://website.com/user.php?user=jon 我希望它看起来像:http://website.com/jon的.htaccess重写不工作
这是我目前在我的htaccess文件
Options +FollowSymLinks
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST-FILENAME} !-d
RewriteCond %{REQUEST-FILENAME} !-f
RewriteCond %{REQUEST-FILENAME} !-l
RewriteRule . user.php?user=%{REQUEST-FILENAME}
但它不工作。
你可以也可以尝试 - RewriteRule(。*)user.php?user = $ 1 – Brett
可以工作;有点。 它让我到我想要的页面,但它说用户不在数据库中。 – Critical
你可以做一个print_r($ _ GET);在这个页面上加载并向我们展示你的问题的输出(甚至可以在user.php上发布代码) – Brett