If you are using https, then you may need to make some changes to your .htaccess code. If you are doing rewrites that use the full URL (for example
https://robot.lk/page.htm) and you will be switching between http and https, then you will need to add a RewriteCond to your code. You will need to test for https and code the full URL accordingly (using http or https). The following examples show how to test for https or the lack of https.
Code: Select all
RewriteCond %{HTTPS} on
RewriteCond %{HTTPS} !=on
For example, if you want to force all requests to your site to use https, you could use the following:
Code: Select all
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]