httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] Redirect HTTP to HTTPS does not work (mod_rewrite)
Date Tue, 16 Apr 2013 13:07:05 GMT
On 16/04/2013 10:17 PM, "Felipe Roman" <roman.felipe@gmail.com> wrote:
>
> Hi Igor,
>
> Thanks for your help. I replaced the %{SERVER_NAME} by %{HTTP_HOST} but
the behavior continue the same. The redirect worked fine when I access
> http://myhost.com/dashboard I got redirected to
https://myhost.com/dashboard
>
> but after the redirect the login page does not work anymore... even other
systems running in the same server outside the dashboard directory stopped
to work with the same problem. If I just comment this line and restart the
Apache everything works fine again.
>
> Any other ideas ?
>
Yes, check the log files for errors thats what they are for.

> Thanks
>
>
> On Mon, Apr 15, 2013 at 7:19 PM, Igor Cicimov <icicimov@gmail.com> wrote:
>>
>> RewriteRule ^/dashboard$ https://%{HTTP_HOST}/dashboard [R=301,L]
>>
>> On 16/04/2013 7:58 AM, "Felipe Roman" <roman.felipe@gmail.com> wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to configure a specific application (developed in
Python/Django) to run only through HTTPS, what I need is redirect a
specific directory to HTTPS:
>>>
>>> FROM
>>>
>>> http://myserver.com/dashboard
>>>
>>> TO
>>>
>>> https://myserver.com/dashboard
>>>
>>> I created some redirect rules on apache httpd.conf like that:
>>>
>>> RewriteCond %{HTTPS} !=on

There shouldnt be empty line between these two.

>>> RewriteRule ^/dashboard$ https://%{SERVER_NAME}/dashboard [R=301,L]
>>>
>>> The redirect from HTTP to HTTPS is working fine... but after redirected
to the HTTPS address the login page does not work anymore... looks like the
POST parameters are missing… if I comment my redirect rules everything
works fine again
>>>
>>> Has anyone have any idea if I forgot any step to do that ? Other ideas ?
>>>
>>> I also tried to use http://wiki.apache.org/httpd/RedirectSSL
>>>
>>> But I don't have a VirtualHost I need to do this redirect in a
directory only.
>>>
>>> Any ideas ?
>>>
>>> Thanks in advance,
>>>
>>> --
>>>
>>> Best Regards,
>>> Felipe Roman
>>> LinkedIn http://au.linkedin.com/in/feliperoman
>
>
>
>
> --
> Best Regards,
> Felipe Roman
> Phone 55 51 8454 8110
> LinkedIn http://au.linkedin.com/in/feliperoman

Mime
View raw message