Need Help with htaccess 301 redirect to SSL for c57 Website
Permalink
# Rewrite Rules <IfModule mod_rewrite.c> RewriteEngine On # Force SSL RewriteCond %{SERVER_PORT} 80 RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # Force Trailing slash RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteCond %{REQUEST_URI} !^/index.php RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] # Force www RewriteCond %{HTTP_HOST} !^$ RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # Concrete5 Pretty URLs
Message me if it doesn't work, happy to get it working for you
Did you also enable Pretty URLs in the admin settings?
System & Settings -> URLs and Redirection -> Tick the 'remove index.php' box
# Rewrite Rules
<IfModule mod_rewrite.c>
RewriteEngine On
# Force SSL
RewriteCond %{SERVER_PORT} 80
RewriteRule ^https://www.%{HTTP_HOST}%{REQUEST_URI}... [R=301,L]
# Force Trailing slash
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
# Force www
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^https://www.%{HTTP_HOST}%{REQUEST_URI}... [R=301,L]
# Concrete5 Pretty URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
Are you hosting it on a dedicated server or with another hosting provider?
Can't help much more without a live url and access to your FTP to put some tests in the htaccess file to see if it is enabled or not.
Message me if you'd like me to look at it
Email me on hello @ tm-designs.co.uk
hope you are using latest 5.7 version. Is some version we had an issue with saving canonical url on backend. Update or edit through db may work. Let me know if you need quick help. You may reach me on info(@)pixelmargin.com
Thanks