-
MODX Staff
- 10,725 Posts
That setting isn’t really used for anything.
You can access any modx site from multiple domains; that’s up to how you have your domains mapped in your web server. However, you seem to indicate something about copying files which would tell me that you have separate directories serving HTTP and HTTPS on your web server. That will be more problematic, and I don’t see an easy way to deal with it.
The only sites I have that are both SSL and non-SSL are served from the same directory and MODx takes care of forcing the pages that must be SSL (for PCI compliance) to https and the others to http using a custom plugin I wrote for it.
yes, that is exactly what we are currently trying to do and yes, it is proving problematic!
any chance you can elucidate more on the solution you came up with to serve both versions from the same directory?
thanks!
We too are having the same problem trying to get HTTP and HTTPS to work off one directory.
Any help would be much appreciated!
Hi Jason,
Many thanks for this plugin. I see that this would work well for specific pages but in this case I need the entire site to be served as HTTP and HTTPS (I would have a version of all the modx system files in both directories).
Would your plugin work if I ignored the $insecurePages and simply used the
if ($_SERVER[’SERVER_PORT’] == 443 || (isset($_SERVER[’HTTPS’])) to determine which version was being requested in the URL?
Or would the plugin need to be changed further?
Many thanks!
-
MODX Staff
- 10,725 Posts
I don’t understand, if there is no redirection and all pages are available both secure and unsecure (which is by-the-way, insecure by definition), why do you need the plugin at all; wouldn’t it just serve which was requested? This plugin is designed for http and https to be delivered from the same directory and for pages to be exclusively available as one or the other, not both, forcing a redirect if a page is accessed with the wrong protocol.
jason,
for reasons beyond my understanding the client of the site in question wants to have both HTTP and HTTPS versions of the same site. (i think this is due to some of their clients that will access the site via a desktop application that uses HTTPS). obviously they don’t want to duplicate every single page of the site, hence attempting to run off the same database.
if i duplicate just the modx system files into the https directory and use the http version of the manager to edit content both versions work immediately. however, the links within the site (the one’s created by wayfinder, ditto, etc) are all "http://" regardless of which URL is used. this is where i am having problems. once the user is viewing the https version i can’t get the links to remain as https, they always revert to http.
does this make any sense at all??
:)
-
MODX Staff
- 12,272 Posts
Maybe create a symbolic link from the http directory and make it the https directory?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me