Re: ProxyPass without slash not working

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

 



Sorry, I put the wrong example, below the correct:

ProxyPassMatch ^/(.*) http://static.host.com.br/html/directory
ProxyPassReverse / /html/directory/

But,

When the url is /anythig
It's redirected to /anything/ with 302.

But I would like with 301.

How I do?



On Thu, Oct 10, 2013 at 7:24 PM, Tiago Braga <tbragamachado@xxxxxxxxx> wrote:
I did the below rules:

ProxyPassReverse / /html/comprafacilempresas/

And it's working! Thanks!



On Thu, Oct 10, 2013 at 5:13 PM, Tiago Braga <tbragamachado@xxxxxxxxx> wrote:
On Thu, Oct 10, 2013 at 4:13 PM, trifo <trifo75@xxxxxxxxx> wrote:

maybe a workaround to add the trailing slash automagically using reweite rule?


I has tried and not works.
 

--Trifo

≈( Telefonról küldve )≈

On Oct 10, 2013 6:39 PM, "Tiago Braga" <tbragamachado@xxxxxxxxx> wrote:



On Thu, Oct 10, 2013 at 1:11 PM, Eric Covener <covener@xxxxxxxxx> wrote:
On Thu, Oct 10, 2013 at 12:03 PM, Tiago Braga <tbragamachado@xxxxxxxxx> wrote:
> Looking the log and I see an thing:
>
> 127.0.0.1 - - [10/Oct/2013:13:00:46 -0300] "GET /teste HTTP/1.1" 302 301 "-"
> "lwp-request/5.827 libwww-perl/5.833"
> 127.0.0.1 - - [10/Oct/2013:13:00:46 -0300] "GET /html/directory/test/
> HTTP/1.1" 404 594 "-" "lwp-request/5.827 libwww-perl/5.833"

> Why do it occurs?

The backend server redirected you to add a trailing slash. The proxy
is supposed to strip off the /html/directory due to ProxypassReverse
before the redirect goes out, but it doesn't happen.
 
Look the directive "UseCanonicalName" in the doc of apache:

"An example where this may be useful is on an intranet server where you have users connecting to the machine using short names such as www. You'll notice that if the users type a shortname, and a URL which is a directory, such as http://www/splat, without the trailing slash then Apache will redirect them tohttp://www.domain.com/splat/. .... But if UseCanonicalName is set Off, then Apache will redirect to http://www/splat/."

So, when the url /test is called, it's redirected with trailing slash, but not working with ProxyPass and ProxyPassReverse.

How do I fix it?

Thanks!

--
Atenciosamente,
Tiago Braga Machado



--
Atenciosamente,
Tiago Braga Machado



--
Atenciosamente,
Tiago Braga Machado



--
Atenciosamente,
Tiago Braga Machado

[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