Skip to content

Instantly share code, notes, and snippets.

@jackmcdade
Created July 27, 2012 05:17
Show Gist options
  • Save jackmcdade/3186283 to your computer and use it in GitHub Desktop.
Save jackmcdade/3186283 to your computer and use it in GitHub Desktop.
Adding .html to the end of URLS
// 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