Created
December 30, 2016 02:55
-
-
Save artagnon/55aa8b050332b27b737f2552290aa750 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options +FollowSymLinks -MultiViews | |
DirectorySlash Off | |
RewriteEngine On | |
RewriteCond %{SCRIPT_FILENAME}/ -d | |
RewriteCond %{SCRIPT_FILENAME}.html !-f | |
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L] | |
RewriteCond %{ENV:REDIRECT_STATUS} ^$ | |
RewriteRule ^(.+)\.html$ /$1 [R=301,L] | |
RewriteCond %{SCRIPT_FILENAME}.html -f | |
RewriteRule [^/]$ %{REQUEST_URI}.html [QSA,L] | |
ErrorDocument 404 /404 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment