httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chengas123 <benjamin.j.mcc...@gmail.com>
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 lumidant.com.  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 Lumidant.com 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.

Thanks,
Ben



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: http://www.nabble.com/mod_rewrite-question---How-to-avoid-Apache%27s-301-redirect-to-add-trailing-slash--tp15707662p15728574.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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