Can you secure modx like that ? Or is any other way to have secure login on modx ?
I run it on a Debian VPS and mode rewrite enabled and SSL.
When I try to use this condition, in .htaccess, it ends up in a loop, with firefox giving me this error:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
redirect loop.
this is the .htaccess:
# Friendly URLs Part
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} .
# Force all pages to go to www.domain.com for SEO
RewriteCond %{HTTP_HOST} !^www\.mydomain\.com [NC]
RewriteRule (.*)
http://www.mydomain.com/$1 [R=301,L]
# Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
# Additional Settings Follow
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary
SetEnvIf brokenvary 1 force-no-vary
AddType text/x-component .htc
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$
https://mydomain.com/manager/$1 [R=301,L]
The address bar, turns to this:
www.mydomain.com/manager/index.php?q=manager/manager/index.php&q=manager/manager/index.php&q=manager/manager/index.php&q=manager/manager
I tried Apache redirect and every time ends up in a loop.
[ed. note: modxvirtual last edited this post 13 years, 3 months ago.]