2014-01-24 71 views

回答

0

使用此規則在您的DOCUMENT_ROOT/.htaccess file:

RewriteEngine On 

RewriteCond %{QUERY_STRING} ^id=00000000001$ [NC] 
RewriteRule ^watch\.php$ /404/? [NC,L,R=301] 
+0

Thanks for reply @anubhava,I teste d你的代碼,但不幸的是不適合我。有沒有其他的規則? – neogeo

+0

以上.htaccess的位置是什麼?是否有更多的規則或只是這個規則?是.htaccess和mod_rewrite啓用? – anubhava

+0

我解決了修改你的原代碼。我不知道這些規則是否完全正確,但似乎工作正常: 'RewriteCond%{REQUEST_URI} ^/watch \ .php $ RewriteCond%{QUERY_STRING}^id = 00000000001 $ RewriteRule ^(。* )$ http // www.domain.com/404/[L,R = 301]' – neogeo