Re: mod_rewrite question - How to avoid Apache's 301 redirect to add trailing slash?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all for your help.  There were a couple problems I was having.  The
biggest turned out to be an .htaccess file in another directory interfering
with this one, which made it very hard to figure out what was going on.  

Thanks again,
Ben



chengas123 wrote:
> 
> 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--tp15707662p15729200.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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux