I did the below rules:

ProxyPassMatch ^/(.*)
http://static.comprafacil.com.br/html/comprafacilempresas
ProxyPassReverse / /html/comprafacilempresas/

And it's working! Thanks!



On Thu, Oct 10, 2013 at 5:13 PM, Tiago Braga <tbragamach...@gmail.com>wrote:

> On Thu, Oct 10, 2013 at 4:13 PM, trifo <trif...@gmail.com> 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" <tbragamach...@gmail.com> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Oct 10, 2013 at 1:11 PM, Eric Covener <cove...@gmail.com> wrote:
>>>
>>>> On Thu, Oct 10, 2013 at 12:03 PM, Tiago Braga <tbragamach...@gmail.com>
>>>> 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

Reply via email to