Forum Moderators: phranque

Message Too Old, No Replies

Rewrite /home/mysite/www/articles/widgets.html

         

Frank_Rizzo

12:26 pm on Feb 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In the error logs I see a few 404 entries generated by search engines. The files do exist but the search engine is looking for the full server path

e.g.

[Fri Feb 16 12:19:23 2007] [error] [client 74.6.nn.nnn] script '/home/mysite/www/articles/widgets.html' not found or unable to stat

The first thing that bothers me is why the SE has indexed this on the full server path? I've run tests such as xenu but can not find where it is picking this up from. I assume it could have been years ago, or on a rare occasion when php failed temporarily.

Anyway. How can I rewrite all requests for

/home/mysite/www/

to /

Is it worth doing this? There are only 10 of these errors a month. Should I just let the SE continue to 404 and eventually drop the page.

What about robots.txt Can that be used to block /home/mysite/www or does it only work with reference to the root of the website?

[edited by: Frank_Rizzo at 12:28 pm (utc) on Feb. 16, 2007]

jdMorgan

3:47 pm on Feb 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could redirect that root path the same as any other URL. Similarly, you could use robots.txt as you propose, because that is never a valid URL-prefix; It is a server filepath.

As to how it got exposed, the usual answer is either a bad link-generating script putting bad links on your pages, a scripted response or RewriteRule intended as an internal rewrite but coded as an external redirect, or malicious competitor activity.

Jim