Modx setup redirect to http, and make it impossible to install modx with ssl #13241

carlo-13 opened this Issue Jan 6, 2017 · 4 comments


None yet

5 participants

carlo-13 commented Jan 6, 2017


Modx setup redirect to http, and makes it impossible to install modx with ssl

Step to reproduce

Make a fresh install of Modx.
Upload the htaccess file below.
And try to run the setup in ssl

Observed behavior

The first page is https, but when I go to "/setup", it keeps redirecting to http.

Expected behavior

The website should remain https during the process


MODX 2.5.4
PHP 7.0.14
Database 5.5.50-MariaDB
Server app CGI/FastCGI
System Linux

Htaccess file


shamarin commented Jan 6, 2017 edited

And what's the problem?! It's not modx bug. You just didn't done redirect via .htaccess file. Uncomment this code in you .htaccess file:
RewriteCond %{SERVER_PORT} !^443
RewriteRule (.*)$1 [R=301,L]
I did installation via ssl on my sites with such dirrective and everything was ok.

Jako commented Jan 6, 2017 edited

It could be a bug and the rewrite is a workaround.


Odd. I am pretty sure I have ran successful setups on my development server, which uses strict HTTPS. Let me give it a try

manicko commented Jan 22, 2017

this refers to an issue #13259

There should be massive checks in the htaccess

RewriteCond %{SERVER_PORT} !^443
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteCond %{HTTP:Front-End-Https} !on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

and the massive checks in the config core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment