Created
December 23, 2013 19:16
-
-
Save arelthia/8102940 to your computer and use it in GitHub Desktop.
Remove php extension
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^/]+)/$ $1.php | |
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ | |
RewriteRule (.*)$ /$1/ [R=301,L] | |
</IfModule> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment