adamaoc/mandj/master/.htaccess - Htaccess File

adamaoc/mandj/master/.htaccess

Options +FollowSymLinks
RewriteEngine On

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

RewriteRule ^$ ./dist/index.html [L]
RewriteRule ^/?$ ./dist/index.html [L]

RewriteRule ^about$ ./dist/about.html [L]
RewriteRule ^about/$ ./dist/about.html [L]
RewriteRule ^about.html$ ./dist/about.html [L]

RewriteRule ^contact$ ./dist/contact.html [L]
RewriteRule ^contact/$ ./dist/contact.html [L]
RewriteRule ^contact.html$ ./dist/contact.html [L]

RewriteRule ^interior$ ./dist/interior.html [L]
RewriteRule ^interior/$ ./dist/interior.html [L]
RewriteRule ^interior.html$ ./dist/interior.html [L]

RewriteRule ^exterior$ ./dist/exterior.html [L]
RewriteRule ^exterior/$ ./dist/exterior.html [L]
RewriteRule ^exterior.html$ ./dist/exterior.html [L]

RewriteRule ^sitemap$ ./dist/sitemap.xml [L]
RewriteRule ^sitemap/$ ./dist/sitemap.xml [L]

RewriteRule ^styleguide$ ./dist/styleguide.html [L]
RewriteRule ^styleguide/$ ./dist/styleguide.html [L]
RewriteRule ^styleguide.html$ ./dist/styleguide.html [L]

RewriteRule ^404$ ./dist/404.html [L]
RewriteRule ^404/$ ./dist/404.html [L]
RewriteRule ^404.html$ ./dist/404.html [L]

# 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/

# ##############################################################################
# # 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, SCRIPT_FILENAME

Comments

Apache