Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- via this intermediate figment of the imagination


n00b1 - 1:59 pm on Jun 23, 2012 (gmt 0)


Having put back up the 'www' DNS server entries I was trying to redirect using HTACCESS. This was a 301 redirect to a location that doesn't exist. The problem is that the first step of this is a 301 redirect which the server reads first...

I seem to have cleaned this up so that it returns a 404 (still using HTACCESS). I used this code (without the space before 'mydomain' in the second instance):

RewriteEngine on
rewritecond %{http_host} ^www.mydomain.com [nc]
rewriterule ^(.*)$ http:// mydomain.com/nonexistant [l,r=404,nc]

And that seems to push the user over to a location that doesn't exist whilst returning a 404 right from the start. Interesting.

Edit: That seems to bypass my custom 404 page. Great. And I can't resolve to any folder using DNS as it only lets me redirect to an entire domain or subdomain. I am also using Wordpress if that makes any difference.


Thread source:: http://www.webmasterworld.com/google/4399904.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com