httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ari Davidow <>
Subject [users@httpd] stripping trailing slash
Date Tue, 06 Jan 2004 18:34:34 GMT
I am running an application (written in php, if that matters) such that 
whatever string someone types after the server name should be passed to the 
application as an argument, e.g., for

"dothis" is passed to the application.

Unfortunately, knowledgeable people keep adding trailing slashes, which 
seems to break things. I haven't found a working way to remove the trailing 
slash (if extant) prior to passing the string to my application.

I am using mod_rewrite, and first tried:

         ReWriteRule ^/notfound.html - [L]
         ReWriteRule ^/([-a-zA-Z0-9_]*)?/+$ /myscript/$1 

which simply doesn't seem to catch anything (vs.

         ReWriteRule ^/([-a-zA-Z0-9_]*)?$ /myscript/$1 

which works for everything but strings with trailing slashes.

What obvious thing am I missing? Surely this should be trivial.


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