我想重新审核此网址http://www.example.com/tev/?user-register=registered 到主页http://www.example.com/
我的htaccess文件中有以下代码,但它无法正常工作
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^user-register=registered$
RewriteRule .* http://www.example.com/ [R=301,L]
答案 0 :(得分:0)
尝试:
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^user-register=registered$
RewriteRule ^tev/?$ http://www.example.com/? [NC,R=301,L]