scotsninja/Tethys-CMS/master/htdocs/.htaccess
Header unset Pragma
FileETag None
Header unset ETag
AddType image/x-icon .ico
Addtype application/rss+xml .rss
Options -Multiviews
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
#RewriteCond %{HTTP_HOST} ^www.20xxproductions.com$ [NC]
#RewriteRule ^(.*)$ http://20xxproductions.com/$1 [R=301,NC,L]
# don't route requests for sitemap or favicon through base-page
RewriteRule ^sitemap.xml$ sitemap.xml [NC,L]
RewriteRule ^favicon.ico$ favicon.ico [NC,L]
# redirect common index pages to single url
RewriteRule ^index.html/?$ / [R=301,L,NC]
RewriteRule ^index.htm/?$ / [R=301,L,NC]
RewriteRule ^index.asp/?$ / [R=301,L,NC]
RewriteRule ^index.aspx/?$ / [R=301,L,NC]
RewriteRule ^index.default.asp/?$ / [R=301,L,NC]
RewriteRule ^index.php/?$ / [R=301,L,NC]
# redirect requests to base-page.php
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !base-page.php
RewriteCond %{REQUEST_FILENAME} !admin/(.*)
RewriteCond %{REQUEST_FILENAME} !ajax/(.*)
RewriteCond %{REQUEST_FILENAME} !ckeditor/(.*)
RewriteCond %{REQUEST_FILENAME} !plupload/(.*)
RewriteCond %{REQUEST_FILENAME} !uploads/(.*)
RewriteCond %{REQUEST_FILENAME} !css/(.*)
RewriteCond %{REQUEST_FILENAME} !js/(.*)
RewriteCond %{REQUEST_FILENAME} !img/(.*)
RewriteCond %{REQUEST_FILENAME} !files/(.*)
RewriteCond %{REQUEST_FILENAME} !rss/(.*)
RewriteRule ^(.*)$ base-page.php?url=$1 [QSA,L]
ErrorDocument 403 /403.php
ErrorDocument 404 /404.php
ErrorDocument 500 /500.php
# 1 YEAR
<filesMatch ".(ico|pdf|flv|doc|swf|mp3|mp4)$">
Header set Cache-Control "max-age=29030400, public"
</filesMatch>
# 2 HOURS
<filesMatch ".(xml|txt|rss)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</filesMatch>
# 1 WEEK
<filesMatch ".(jpg|jpeg|png|gif|js|css)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
# NEVER CACHE
<filesMatch "^!(min).(html|htm|php|cgi|pl)$">
Header set Cache-Control "max-age=1, no-cache"
Header unset Last-Modified
</filesMatch>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 29030400 seconds"
ExpiresByType image/jpeg "access plus 29030400 seconds"
ExpiresByType image/png "access plus 29030400 seconds"
ExpiresByType text/css "access plus 29030400 seconds"
ExpiresByType text/javascript "access plus 29030400 seconds"
ExpiresByType application/x-javascript "access plus 29030400 seconds"
ExpiresByType image/x-icon "access plus 1 month"
</ifModule>
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
On Github License
Files