help with HTTPS problem
Permalink 1 user found helpful
I purchased a positive SSL certificate for my site. Im using V8 of C5.
I changed the URL's setting to remove .php and set Canonical URL to HTTPS.
I adde this to the htaccess file...
The site is performing very strangely.
Using Firefox and Chrome on imac the site renders but the home page and one other page shows as not secure. On mac Safari all the style disappears completely.
Ive tried various other setting in C5 in the URL's section but nothing seems to get the correct result.
Am I missing something or could it be the theme that is faulty??
Ive had to set it all back to HTTP for now.
I changed the URL's setting to remove .php and set Canonical URL to HTTPS.
I adde this to the htaccess file...
RewriteOptions inherit RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteCond %{REQUEST_FILENAME}/index.php !-f RewriteRule . index.php [L] </IfModule>
The site is performing very strangely.
Using Firefox and Chrome on imac the site renders but the home page and one other page shows as not secure. On mac Safari all the style disappears completely.
Ive tried various other setting in C5 in the URL's section but nothing seems to get the correct result.
Am I missing something or could it be the theme that is faulty??
Ive had to set it all back to HTTP for now.
Looks like you've added your code at the wrong place. This is what I have:
The HTTPS 'RewriteCond' and 'RewriteRule' should be AFTER the 'RewriteEngine On' and BEFORE the 'RewriteBase'
# -- concrete5 urls start -- <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}/index.html !-f RewriteCond %{REQUEST_FILENAME}/index.php !-f RewriteRule . index.php [L] </IfModule> # -- concrete5 urls end --
The HTTPS 'RewriteCond' and 'RewriteRule' should be AFTER the 'RewriteEngine On' and BEFORE the 'RewriteBase'
Sorry it's taken me ages to reply.
The code you sent me breaks my site so that can't be right.
I've since found out that you don't really need htaccess code for later 5.7 and v8.
Thanks for you help though.
The code you sent me breaks my site so that can't be right.
I've since found out that you don't really need htaccess code for later 5.7 and v8.
Thanks for you help though.
For me is working perfectly without the need to add rewriting rules in .htaccess.