httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chengas123 <>
Subject Re: [users@httpd] mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?
Date Thu, 28 Feb 2008 02:51:32 GMT

Thanks noodl.  This is a good idea, which I would like to use.  I can't
figure out how %{REQUEST_FILENAME} works though!  
If I use "RewriteCond %{REQUEST_FILENAME} -d" it only ever returns when I
visit my homepage at  I used only this rule in my .htaccess
and had it redirect to Yahoo! for testing.  I could never get it to fire off
for any subdirectories.  I am guessing that the command is starting from
some directory I am not aware of, so when I visit it is
checking whether "/" is a directory and it would be from wherever you start. 
However, I cannot figure out where the command is starting from.  I tried
replacing it with "/public_html%{REQUEST_FILENAME}" and
"/home/lumidant/public_html%{REQUEST_FILENAME}" and neither worked.
Any ideas on how I can debug this?  I'm on BlueHost if that matters.


noodl wrote:
> # rules as before
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteCond %{REQUEST_URI} !/$
> RewriteRule (.*) $1/
> .. or something similar. This assumes you're using htaccess.
> noodl

View this message in context:
Sent from the Apache HTTP Server - Users mailing list archive at

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