Reputation: 23
My .htaccess file is shown below
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Recently I have installed the SSL, so I needs to make sure that my customers connect to my website in HTTPS. So what changes I needs to make in this code to load my website in SSL
Upvotes: 2
Views: 21
Reputation: 41219
To load your site in SSL ,you can use
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#http to https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [NE,L,R]
###########
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Upvotes: 1