Re: RewriteRule: foo.com/directory --> foo.com/directory/

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

 



On Feb 4, 2008 5:20 PM, thomas Armstrong <tarmstrong@xxxxxxxxx> wrote:
> I tried adding this line
> ---------
> RewriteRule ^(.*)$ /$1/ [R=301]
> ---------

> The page isn't redirecting properly

At least protect it from running when the URL ends in a slash such as:

RewriteRule ^(.*[^/])$ /$1/ [R=301]

You're unexpected behavior is a result of doing rewrite in .htaccess,
so the rules are re-visited at a later stage despite the L flag.
-- 
Eric Covener
covener@xxxxxxxxx

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