Hi I need redirect 3 posible directions to https in htaccess, example: www.domain.com http://www.domain.com domain.com to https://www.domain.com In ever tip I do have problems with cookies and redirections, please help, I don´t know how finish this problem.
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} Code (markup): From http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/
Thanks, but this code don´t work: when I go to domain.com he goes to https://domain.com and it´s necesary go to https://www.domain.com the domain have 5 subdomains, when I go to one subdomain he goes to https://subdomain.domain.com and don´t work, because subdomain don´t have SSL I need write 3 rules, no 1 for all, but thanks for you help
Hey! Just add the static domain in the RewriteRule: RewriteRule (.*) https://www.domain.com/%{REQUEST_URI} Code (markup):