Created
April 11, 2016 19:57
-
-
Save j26design/e50087b947a4148477e4e4328da351c3 to your computer and use it in GitHub Desktop.
Force .html extension with .htaccess
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
# This code must be placed in the .htaccess | |
# file that is located in the root directory | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^([^.]+?)/?$ /$1.html [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment