0

I have edited my .htaccess to it directs to https but now I am getting this error;

'www.siteexample.com redirected you too many times'

I have tried many versions this being the last

RewriteEngine On
# ========================================= #
# Force website to use "www"
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
# ========================================= #

# ========================================= #
# Force website to use "https"
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
# ========================================= #

# ========================================= #
# Send would-be 404 requests to Craft
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
RewriteRule (.+) index.php?p=$1 [QSA,L]
# ========================================= #

Which was by @Lindsey D in this post.

When I take it out the error doesn't happen which is expected. Though I have found that it's only for mobile the https isn't working.

Thanks for the help, Zack

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.