Saturday, 24 June 2017

.htaccess - htaccess redirect to https AND www not working

I'd like to redirect any insecure request to https, AND make sure that the url always uses 'www'. This is what I have but doesn't seem to work. What am I missing?





Options +FollowSymLinks
RewriteEngine On


RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...