[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#391290: apache should automatically detect extra periods/commas at the end of URLs and fix



2006/10/5, Stefan Fritsch <sf@sfritsch.de> wrote:
On Thursday 05 October 2006 22:15, Jason Spiro wrote:
> Many people type in URLs with extra periods or commas. For example,
> a user may type:
>     http://www.jspiro.com/wiki.
> when they actually meant to type:
>     http://www.jspiro.com/wiki
>
> This causes a lot of 404 errors on web servers everywhere. Would it
> be possible for apache to automatically detect extra periods/commas
> at the end of URLs and redirect clients to the correct place?

This can be done with mod_speling or with something like

RewriteRule ^(.*)[,.]$ $1 [R]

though the latter will prevent you from requesting any file ending
with period or comma. With some more refined rewrite magic using
subrequests, you can probably avoid that.

However, by default Apache should return exactly what was requested.
Therefore I close this bug.

Why shouldn't Apache ship with a RewriteRule to correct such a common
error by default? It's very uncommon for webmasters to post files
whose names end with a period or comma anyway.

--
Jason Spiro: computer consulting with a smile.
I also provide training and spyware removal services for homes and businesses.
Call or email for a FREE 5-minute consultation. Satisfaction guaranteed.
416-781-5938 / Email: info@jspiro.com / MSN: jasonspiro@hotmail.com



Reply to: