httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Dessent <>
Subject Re: [users@httpd] Case Sensitivity
Date Fri, 19 Sep 2003 09:00:52 GMT
"Warhurst, SI (Spencer)" wrote:

> > I'm no good with mod_rewrite, but something like
> > this could be
> > possible (don't laugh too much):
> >
> >     RewriteEngine On
> >     RewriteCond d:/www/lists%{REQUEST_URI}.html -f
> >     RewriteRule /(.*) c:/path/to/$1.html
> >
> > There's probably a less hacky version of that RewriteCond,
> > but you get the
> > idea: if the URI is /somelist, it tests if the file
> > d:/www/lists/somelist.html exists, and if so rewrites the path. That
> > requires that all URIs matches the HTML documents.
> That would be a good way of doing it.. okay, I'll get testing on the test
> server :)

Another thing you might try would be to just set the 404 ErrorHandler
for that directory to a script.  This script would do a case-insensitive
check for the list's name against the URL path, and issue a redirect if
it's there, otherwise it would just return a regular 404 error page.  It
has the advantage of only applying if the resource isn't found, so it
wouldn't have the degredation of comparing 4 or 8 thousand regexps for
every request.  But the script execution isn't exactly cheap (time-wise)
so if the majority of hits are for these URLs the regexps might end up
being cheaper.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message