Force SSL on an Apache server

# Force HTTPS
RewriteCond %{SERVER_PROTOCOL} !HTTPS
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L,QSA]

In MODx add this in before # Exclude /assets and /manager directories from rewrite rules

About Keiron

Web Developer based in the UK. Click here if you want to work with me