Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to disable excessively long URLs in Apache |
|
Author |
|
cisgjm
Joined: 27 Sep 2012 Posts: 1 Location: UK
|
Posted: Thu 27 Sep '12 19:05 Post subject: How to disable excessively long URLs in Apache |
|
|
I have a problem with a spider that is scanning my site for malformed (and very long) URLs. An example is this:
178.154.243.101 - - [27/Sep/2012:17:52:56 +0100] "GET /index.html/bulletin_board/quotes/last-words/a-phrase-a-week/meanings/meanings/american-phrases-and-sayings.html HTTP/1.1" 404 3753
What I would like to be able to do is configure Apache so that anything after .../path/index.html is ignored. Any suggestions? |
|
Back to top |
|
VoodooMill
Joined: 11 Jan 2007 Posts: 60
|
Posted: Thu 27 Sep '12 19:17 Post subject: Re: How to disable excessively long URLs in Apache |
|
|
cisgjm wrote: | I have a problem with a spider that is scanning my site for malformed (and very long) URLs. An example is this:
178.154.243.101 - - [27/Sep/2012:17:52:56 +0100] "GET /index.html/bulletin_board/quotes/last-words/a-phrase-a-week/meanings/meanings/american-phrases-and-sayings.html HTTP/1.1" 404 3753
What I would like to be able to do is configure Apache so that anything after .../path/index.html is ignored. Any suggestions? |
Hi there,
Take a look at mod_rewrite http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 27 Sep '12 22:12 Post subject: Re: How to disable excessively long URLs in Apache |
|
|
cisgjm wrote: | "GET /index.html/bulletin_board/quotes/last-words/a-phrase-a-week/meanings/meanings/american-phrases-and-sayings.html |
This is not a malformed url. See: http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo
I should add that many CMS, Blog and BB software use this along with mod_rewrite to make search engine friendly urls.
Turning on AcceptPathInfo, should make index.html come up instead of the 404 in theory, without the need for mod_rewrite. index.html is not a script normally so all the stuff later would just be ignored. |
|
Back to top |
|
|
|
|
|
|