-
☆ A M B ☆
- 476 Posts
I’ve got a MODx site we’re going to be putting a SSL Cert on tomorrow. Currently I have the .htaccess file configured to rewrite for "http://www"
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www.example-site\.com [NC]
RewriteRule (.*) http://www.example-site.com/$1 [R=301,L]
I need to put the SSL Cert on tomorrow and redirect all pages in the site to the new https ... first time to get this request. Do I do it this way?
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTPS_HOST} !^www.example-site\.com [NC]
RewriteRule (.*) https://www.example-site.com/$1 [R=301,L]
Precision Web Development ... SmashStack.com
-
☆ A M B ☆
- 476 Posts
OK...figure it out finally. I forgot to mention in my previous post I’m running MODx 1.0 ... Here’s what I did in the .htaccess:
# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example-site.com/$1 [R=301,L]
That did the trick.
Precision Web Development ... SmashStack.com