.htaccess - redirect drupal 7 site to https -


i have drupal 7 site default .htaccess file. need redirect site possibilities 1 https site.
need is:
http://example.com -> https://example.com http://www.example.com -> https://example.com https://www.example.com -> https://example.com
i have tried many options still error: "this webpage has redirect loop."

default .htaccess looks like: .htaccess

[edited] found solution:
remove www , retirect https:
rewritecond %{http_host} ^www\.(.+)$ [nc]<br> rewriterule ^ https%{env:protossl}://%1%{request_uri} [l,r=301]
redirect non www https:
rewritecond %{server_port} 80 rewriterule ^(.*)$ https://%{http_host}%{request_uri} [r=301,qsa,l]


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -