Forum Moderators: phranque

Message Too Old, No Replies

Invalid URI in request GET

Invalid URI in request GET

         

christo27

7:19 pm on Mar 12, 2012 (gmt 0)

10+ Year Member



Hi.
Excuse my poor english.
I have a lot of "Invalid URI in request GET /../images/image.gif" in my error_log file.
I use relative paths in my website and i think that some bots do not treat relative paths very well by sending requests like "http://www.mysite.com/../images/image.gif".
I think that i can resolve this issue with a rewrite rule that could remove the first two points ".." in the request to make it valid (/images/image.gif instead of ../images/image.gif).
I've tested several rules but i think that i am not a good specialist because none of them works...
Somebody could help me ?

Thank you.

Chriss.

g1smd

8:38 pm on Mar 12, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Run Xenu LinkSleuth over the site to see what you get.


Personally, I would return [F] for all such requests, not redirect them.

lucy24

10:20 pm on Mar 12, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Requests like this generally come from stupid robots, not from humans. You are not obliged to make life easier for robots ;)

Relative links in the form ../ are a bit risky anyway. But not because of robots getting lost. Use site-absolute links (beginning in /) unless you have a "package" of files and directories that always stays together.

christo27

12:14 am on Mar 13, 2012 (gmt 0)

10+ Year Member



thank you for your answers.

Actualy i let Apache generate a 404 error so i don't help those certainly stupid bots to have they requests satisfied but the problem is that i have a very fat error_log.

Lucy24, let me tell you that FaceBook himself sends me a lot of those invalid requests through his facebookexternalhit system and i think that they have nothing to do with my hundreds of poor 404 errors.

Finaly, i can't change to absolute paths because i have several other domains (aliases) that point to the master one.