alkrauss48/thesocietea/master/modx.htaccess - Htaccess File


# set default document to index.php, not index.html
DirectoryIndex index.php index.html

# compress individual types of data
#AddOutputFilterByType DEFLATE text/plain
#AddOutputFilterByType DEFLATE text/html
#AddOutputFilterByType DEFLATE text/xml
#AddOutputFilterByType DEFLATE text/css
#AddOutputFilterByType DEFLATE text/php
#AddOutputFilterByType DEFLATE application/xml
#AddOutputFilterByType DEFLATE application/xhtml+xml
#AddOutputFilterByType DEFLATE application/rss+xml
#AddOutputFilterByType DEFLATE application/javascript
#AddOutputFilterByType DEFLATE application/x-javascript
#compress all data served
SetOutputFilter DEFLATE
#set compression to maximum, doesn't cause trouble, except for a bit of slowness on exceptionally old browsers
SetOutputFilter DEFLATE
#turn off compression for browsers with known issues
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

# Serve .htc IE hacks with the correct filetype
AddType text/x-component .htc

# Enable browser caching
ExpiresActive on
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 week"
ExpiresByType application/pdf "access 1 year"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/javascript "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType text/javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"

# FollowSymLinks may not be on by default (e.g. when running under OS X)
# Options FollowSymLinks

#turn on Rewrite
RewriteEngine On
RewriteBase /

# Rewrite -> -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^sub.domain.tld [NC]
RewriteRule (.*) http://sub.domain.tld/$1 [R=301,L]

# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
# when your cert only allows
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*)$1 [R=301,L]

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

# Make sure .htc files are served with the proper MIME type, which is critical 
# for XP SP2. Un-comment if your host allows htaccess MIME type overrides.
AddType text/x-component .htc

# The following directives stop screen flicker in IE on CSS rollovers. If
# needed, un-comment the following rules. When they're in place, you may have
# to do a force-refresh in order to see changes in your designs.
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

On Github License


Download PDF of Htaccess file