Hi, I recently got a SSL-certificate for my website. Now the old links to my website (using only http) doesnt work, the visitors just getting redirected to my index page. How can I change my .htaccess so both http and https works, but keep https as the preferred? Or even better, redirect old http links to https? I'm not using www. My current .htaccess: Thanks
Hi, try any of these: 1) RewriteEngine On RewriteCond %{HTTPS} !^on$ RewriteRule (.*) https://yourdomain/$1 [R,L] Code (markup): 2) RewriteEngine on RewriteCondition %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://yourdomain/$1 [R=301,L] Code (markup): 3) RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourdomain/$1 [R=301,L] Code (markup): The crucial seems to be the "$1" part.