redirect http to https
hi,
i configured ssl over http, every thing is fine and working fine, issue is my site is also working with www.mydomain.com it's working with http, so i commented LISTEN 80. so it's not opening with http. now type www.mydomain.com it's not opening, i have to type https manually infront of it. is there any way so that if i type www.mydomain.com, it will automatically redirected to https://www.mydomain.com i'm using apache on rhel6 thanks in advance. |
Hi Gil@LQ,
You can use mod_rewrite for this. You need to go in the http vhost container and add the following: Code:
RewriteEngine On |
I have something similar that is forwarding all traffic to https.
RewriteEngine on RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] Good luck :) |
Thank you all for your replies.
it worked thank you very much. gil@lq |
All times are GMT -5. The time now is 09:05 AM. |