httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
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.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message