Created
July 27, 2012 05:17
-
-
Save jackmcdade/3186283 to your computer and use it in GitHub Desktop.
Adding .html to the end of URLS
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
// Add the following after line 8 of _app/_routes.php | |
if (substr($path, -5) == '.html') { | |
$path = str_replace('.html', '', $path); | |
} | |
And use the following .htaccess rule before your index.php rewrite: | |
RewriteRule ^([^.]+)$ /$1.html [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment