apache - htaccess on wordpress : why http to https doesn't seem to work -
i want access wordpress admin https. use (copied , paste blog read)
# redirection https rewritecond %{server_port} ^80$ [or] rewritecond %{https} =off rewriterule ^(.*)$ https://example.com/$1 [r=301,l] # redirection www non-www https rewritecond %{http_host} ^www\.example\.com [nc] rewriterule ^(.*)$ https://example.com/$1 [r=301,l] that doesn't work. have modify url hand in chrome.
try adding "rewriteengine on" @ first line, i'd remove condition "%{https} =off" condition "%{server_port} 80" should enough.
rewriteengine on rewritecond %{server_port} 80 rewriterule ^(.*)$ https://example.com/$1 [r,l] rewritecond %{http_host} ^www\.(.*)$ [nc] rewriterule ^(.*)$ https://%1%{request_uri} [r=301,qsa,nc,l]
Comments
Post a Comment