سؤال

Can someone help me to get the correct .htaccess rules for:

Redirect this specific ID url:

http://www.domain.com/watch.php?id=00000000001

to my 404 error page:

http://www.domain.com/404/
هل كانت مفيدة؟

المحلول

Use this rule in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^id=00000000001$ [NC]
RewriteRule ^watch\.php$ /404/? [NC,L,R=301]
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top