adamaoc/ampnet-2.0/master/.htaccess - Htaccess File

adamaoc/ampnet-2.0/master/.htaccess

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
# Options +SymLinksIfOwnerMatch
  RewriteEngine On
# RewriteBase /

RewriteCond %{REQUEST_URI} /+[^.]+$ 
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^about$ ./index.php [L]
RewriteRule ^about/$ ./index.php [L]

RewriteRule ^work$ ./index.php [L]
RewriteRule ^work/$ ./index.php [L]

RewriteRule ^forney-tx-web-development$ ./index.php [L]
RewriteRule ^forney-tx-web-development/$ ./index.php [L]

RewriteRule ^dallas-tx-web-development$ ./index.php [L]
RewriteRule ^dallas-tx-web-development/$ ./index.php [L]

RewriteRule ^rockwall-tx-web-development$ ./index.php [L]
RewriteRule ^rockwall-tx-web-development/$ ./index.php [L]

RewriteRule ^heath-tx-web-development$ ./index.php [L]
RewriteRule ^heath-tx-web-development/$ ./index.php [L]

RewriteRule ^contact$ ./index.php [L]
RewriteRule ^contact/$ ./index.php [L]

RewriteRule ^success$ ./index.php [L]
RewriteRule ^success/$ ./index.php [L]

RewriteRule ^blog$ ./index.php [L]
RewriteRule ^blog/$ ./index.php [L]

# RewriteRule ^404$ ./index.php?error=404 [L]
# RewriteRule ^404/$ ./index.php?error404 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/blog/?filename=$1 [NC,QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/work/?workname=$1 [NC,QSA,L]

</IfModule>

# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP

# Browser Caching
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType text/css A86400
ExpiresByType text/javascript A86400
ExpiresByType application/x-shockwave-flash A2592000
#
<FilesMatch ".(gif¦jpe?g¦png¦ico¦css¦js¦swf)$">
Header set Cache-Control "public"
</FilesMatch>
# END Browser Caching

# ##############################################################################
# # ERRORS                                                                     #
# ##############################################################################

# ------------------------------------------------------------------------------
# | 404 error prevention for non-existing redirected folders                   |
# ------------------------------------------------------------------------------

# Prevent Apache from returning a 404 error for a rewrite if a directory
# with the same name does not exist.
# http://httpd.apache.org/docs/current/content-negotiation.html#multiviews
# http://www.webmasterworld.com/apache/3808792.htm

Options -MultiViews

# ------------------------------------------------------------------------------
# | Custom error messages / pages                                              |
# ------------------------------------------------------------------------------

# You can customize what Apache returns to the client in case of an error (see
# http://httpd.apache.org/docs/current/mod/core.html#errordocument), e.g.:

ErrorDocument 404 /404.php

# ##############################################################################
# # INTERNET EXPLORER                                                          #
# ##############################################################################

# ------------------------------------------------------------------------------
# | Better website experience                                                  |
# ------------------------------------------------------------------------------

# Force IE to render pages in the highest available mode in the various
# cases when it may not: http://hsivonen.iki.fi/doctype/ie-mode.pdf.

<IfModule mod_headers.c>
    Header set X-UA-Compatible "IE=edge"
    # `mod_headers` can't match based on the content-type, however, we only
    # want to send this header for HTML pages and not for the other resources
    <FilesMatch ".(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$">
        Header unset X-UA-Compatible
    </FilesMatch>
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, REQUEST_FILENAME, REQUEST_URI, SCRIPT_FILENAME

Comments

Apache