php - Convert a full wordpress site to HTTPS -
i'm trying wordpress site https, try gives me redirect loop. i've edited htaccess, i've set in php, i've downloaded wordpress plugin convert it, every method gives me redirect loop error. know has redirecting https http, don't know what. here .htaccess file without of https settings in it:
# begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress
and here's php i'm trying use in header php file conver page https:
if($_server["https"] != "on") { header("location: https://" . $_server["http_host"] . $_server["request_uri"]); exit(); }
you don't need blanket redirect in .htaccess or in php. go dashboard >> settings , change urls https. save permalinks.
you may want find/replace http urls in post/page content, media urls, etc, don't redirects http https. try interconnectit.com wordpress serialized php search replace tool
after https working, use firebug firefox, or use developer tools in chrome or safari or ie see if getting "insecure content" errors non-https urls in theme files.
you may need change relative path images in css files, i.e. background-image: url(http://example.com/themes/wp-content/theme/images/image.jpg)
background-image: url(images/image.jpg)
and, may need remove http
absolute paths in php theme files, i.e. change 'http://example.com/image.jpg'
'//example.com/image.jpg'
; allow resources default https.
Comments
Post a Comment