Skip to content


Wordpress issue On HTTPS #1

Dinesh-Ramakrishnan opened this Issue · 3 comments

5 participants


I installed Wordpress App on my Gear as per the guidelines provided in this repo.
When I lauched the Admin page, I am not able to login, Later I changed the Login Form Post URL from http to https it worked.
I faced the same problem with Codeigniter and my solution is posted here.

if ((isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ) || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https'))

Please check and update the code accordingly.

OpenShift Origin member

We've been thinking about ways to better handle this. In the meantime the only workaround is to put some code near the top of your scripts (maybe in the config?) that detects the state of the X-Forwarded-Proto header (http or https) and then manually set $_SERVER['HTTPS'] to on.

I know this isn't a very good answer but at least it's something you can do besides waiting on us to come up with something more permanent :)

OpenShift Origin member

Followed a link here from OpenShift.

Hmm, maybe doing something like: RequestHeader edit Destination ^http: https: early
in the :443 virtual host might work [needs mod_headers].


For reference, you can force HTTPS by updating your .htaccess file:

RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Or simply set 'FORCE_SSL_ADMIN' to false in the wp-config.php file:

define('FORCE_SSL_ADMIN', false);
@bparees bparees closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.