cheatnotz/cheatnotz.github.io/master/.htaccess - Htaccess File

cheatnotz/cheatnotz.github.io/master/.htaccess

RewriteEngine On
#example.com/page will display the contents of example.com/page.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L,QSA]

#301 from example.com/page.html to example.com/page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*.html HTTP/
RewriteRule ^(.*).html$ /$1 [R=301,L]

RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTPS, REQUEST_FILENAME, REQUEST_URI, THE_REQUEST

Comments

Apache