Created
February 1, 2010 16:51
-
-
Save craigw/291813 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Does the requested file not exist? | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# AND is there a file that matches the requested file but with .html at the end? | |
RewriteCond %{REQUEST_FILENAME}.html -f | |
# Then rewrite the request under the hood and serve the HTML file. | |
RewriteRule ^([^.]+)$ $1.html [QSA] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment