You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2018. It is now read-only.
Hey mate, I know this is late and you’ve most likely already found a solution, but I stumbled on your issue when looking to add ssl today on my wordpress blog hosted with heroku.
This worked for me with no redirects. I'm using Automated Certificate Management on Heroku that was released last month though so not using the ssl plugin and I’ve made changes directly to the files.
In the wp-config.php file add the following just above the /* That's all, stop editing! Happy blogging. */ line.
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
And in the .htcaccess file add this below <IfModule mod_rewrite.c> and above RewriteEngine On.
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Hello,
I would like to force SSL on every page of a wordpress site hosted on Heroku using a custom subdomain.
Here is what I tried so far:
Settings -> General
:Without any further custom configurations.
I have one problem:
1/ When I go to this URL: https://mysubdomain.mydomain.com I'm redirected to http://mysubdomain.mydomain.com
What did I miss?
The text was updated successfully, but these errors were encountered: