httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] stripping trailing slash
Date Tue, 06 Jan 2004 21:05:46 GMT

On Tue, 6 Jan 2004, Ari Davidow wrote:
> I am using mod_rewrite, and first tried:
>          ReWriteRule ^/notfound.html - [L]
>          ReWriteRule ^/([-a-zA-Z0-9_]*)?/+$ /myscript/$1
> [T=application/x-httpd-php]
> which simply doesn't seem to catch anything (vs.

That doesn't catch requests with trailing slashes?  It looks like it
should.  But you probably want something more like
ReWriteRule ^/([-a-zA-Z0-9_]*)/*$ /myscript/$1 [T=application/x-httpd-php]
to handle both cases.

The question mark is unnecessary since "*" matches zero or more of the
previous character.


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