我试图创建一个使用的.htaccess在我的网站的网址干净,我有这个网址使用的.htaccess的其他网址
RewriteEngine on
RewriteRule ^([^/]*)/$ /full_posts.php?permalink=$1 [L]
RewriteRule ^category/([^/]*)/$ /search.php?category=$1 [L]
的第一个工作正常,但第二个不工作的重写,我正在写一个又一个。请帮忙!
我试图创建一个使用的.htaccess在我的网站的网址干净,我有这个网址使用的.htaccess的其他网址
RewriteEngine on
RewriteRule ^([^/]*)/$ /full_posts.php?permalink=$1 [L]
RewriteRule ^category/([^/]*)/$ /search.php?category=$1 [L]
的第一个工作正常,但第二个不工作的重写,我正在写一个又一个。请帮忙!
你正在寻找的规则是:
RewriteRule ^([^/]*)/?$ /full_posts.php?permalink=$1 [L]
RewriteRule ^category/([^/]*)/?$ /search.php?category=$1 [L]
我已经在这两种情况下作出最后的斜线optoinal。
您可以测试你的规则: http://htaccess.madewithlove.be/
_not working_;怎么样?您访问了哪个页面?显示什么错误? – hjpotter92