Forum Moderators: phranque
Due to some old pages on domain2 still being listed in Google, I want to temporarily 404 *all* pages under domain2, without affecteting any under domain1.
I've tried the obvious (to me) codes, but they lead to errors.
Any ideas?
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain2.com
RewriteRule .? - [G]
Will give them a status of GONE (410)...
to use a true 404, you will have to redirect to a non-existant page, which will force a redirect, then a 404:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?domain2.com
RewriteRule .? http://www.domain2.com/some-not-real-page.html [R=301,L]
Hope this helps.
Justin