Trouble with .htaccess and SSL
Permalink
Hi, I'm trying to get my site to force all URL's to https www. I've tried everything I can think of, and I can't get it to work properly. I'm either getting redirect loop errors or it just loads the default page. Here is my current working .htaccess file:
Options +FollowSymLinks -MultiViews -Indexes
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L]
</IfModule>
# -- concrete5 urls end --
I've tried adding the following to no effect:
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://www [L]
Any thoughts?
Options +FollowSymLinks -MultiViews -Indexes
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L]
</IfModule>
# -- concrete5 urls end --
I've tried adding the following to no effect:
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://www [L]
Any thoughts?
Depends where you add those directives in... they would need to go before the standard C5 RewriteRule as it won't get passed [L]
Alternatively you could use this addon
http://www.concrete5.org/marketplace/addons/force-ssl/...