.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

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

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

StringGrid issue in Delphi XE8 firemonkey mobile app -