Re: redirect trailing slash problem

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

 



On Tue, Jan 13, 2009 at 2:55 AM, Mike Soultanian <msoultan@xxxxxxxxx> wrote:
> I have a virtual host that accepts all traffic on port 80 and then forwards
> that traffic to another virtual host on port 81:
>
> RewriteRule /(.*) http://localhost:81/$1 [P,L]
>
> It works great except when I leave off the backslash.  So, for example,
> "http://foobar.com/"; works correctly and so does "http://foobar.com"; (no
> trailing slash).  However, if I add a folder without the slash (i.e.
> "http://foobar.com/folder";) , I get forwarded to
> "http://localhost:81/folder/"; instead of "http://foobar.com/folder";.
>
> Does anyone know how to tweak my rewrite such that it will forward
> correctly, regardless of whether or not the folder has a trailing slash?

ProxyPassReverse would fix the redirect that's being sent by mod_dir's
DirectorySlash.

Or, add the trailing slash in your RewriteRule, so mod_dir doesn't
have to do anything.


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