NathanTCz/sbl-app.com/dev/.htaccess - Htaccess File

NathanTCz/sbl-app.com/dev/.htaccess

Options All -Indexes

<files .htaccess>
order allow,deny
deny from all
</files>

<files *.log>
order allow,deny
deny from all
</files>

#-----------------------MOD_REWRITE-------------------------

Options +FollowSymLinks

RewriteEngine On

# Ignore paths to css, js, and images
RewriteCond %{REQUEST_URI} !^.*.(|js|css|images|).*$ [NC]

# Rewrite urls with get variables.
RewriteRule ^([a-zA-Z]+)$ /index.php?page=$1 [NC,L]
RewriteRule ^([a-zA-Z]+)/(d+)$ /index.php?page=$1&id=$2 [NC,L]

RewriteRule ^web/([a-zA-Z]+)$ $1.php [NC,L]

#-----------------------END_REWRITE-------------------------

# 404 Page
ErrorDocument 404 /index.php?page=404

#----------------------CACHE_CONTROL------------------------
Header unset Pragma
FileETag None
Header unset ETag
 
# 1 YEAR
<FilesMatch ".(jpg|jpeg|png)$">
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
</FilesMatch>
 
# 2 HOURS
<FilesMatch ".(html|htm|xml|txt|xsl)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>
 
# CACHED FOREVER
# MOD_REWRITE TO RENAME EVERY CHANGE
<FilesMatch ".(otf|ttf|js|css)$">
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
</FilesMatch>
#--------------------END_CACHE_CONTROL----------------------

#--------------------GZIP_COMPRESSION-----------------------
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

On Github License

Files

Download PDF of Htaccess file
CACHE, DEFLATE, Pragma, REQUEST_URI

Comments

Apache