EssomenicSystems/Main-Website/master/.htaccess - Htaccess File

EssomenicSystems/Main-Website/master/.htaccess

RewriteEngine On

# Redirect to https
# RewriteCond %{HTTPS} !^on$
# RewriteRule (.*) https://www.essomenic.co/$1 [R,L]

# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

# Redirect broken links
redirect /tos-privacy.html /tos-privacy
redirect /support/documentation/general-overview.html /support/documentation/general-overview
redirect /support/documentation/configuring-project.html /support/documentation/configuring-project
redirect /support/documentation/configuring-access.html /support/documentation/configuring-access
redirect /support/documentation/login-registration.html /support/documentation/login-registration
redirect /about.html /about
redirect /support.html /support
redirect /cms/servicevisor.essomenic.co/signup http://servicevisor.essomenic.co/signup
redirect /contact/%20 /contact

# cache images and flash content for one month
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

# cache text, css, and javascript files for one week
<FilesMatch ".(js|css|pdf|txt|woff)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

# cache html and htm files for one day
<FilesMatch ".(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>

# disable directory browsing
Options All -Indexes

# set the error page
ErrorDocument 404 /404/

# Compress text files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript

# Security Protection
Header set X-Frame-Options SAMEORIGIN
Header set X-Frame-Options DENY
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, HTTPS, ORIGIN

Comments

Apache