Options +FollowSymlinks
RewriteEngine On
#RewriteBase /modx
#Fix missing trailing slash character on folders.
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]
#www.domain.com and domain.com will map to the folder {root}/folder1/
RewriteCond %{HTTP:Host} ^(?:www\.)?mywebsite\.org$
RewriteCond %{REQUEST_URI} !^/modx/
RewriteRule ^(.*) modx/$1 [NC,L,NS]
#The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public_html/modx/index.php?q=$1 [L,QSA,NC]
# For full documentation and other suggested options, please see
# http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
# and especially for the first three commented out rules
Options +FollowSymlinks
RewriteEngine On
RewriteBase /modx
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Reduce server overhead by enabling output compression if supported.
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5
.#Options +FollowSymlinks
RewriteEngine On
RewriteBase /modx
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
#Options +FollowSymlinks
/index.php?q=$1 [L,QSA]
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} \.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]
.
RewriteCond %{HTTP_HOST} \.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} \.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.yourdomain.com\.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com%1/index.php?q=$1 [R=301,L]
.RewriteCond %{HTTP_HOST} ^www.yourdomain.com\.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/%1/index.php?q=$1 [R=301,L]
.