Created
January 16, 2016 11:53
-
-
Save mskian/1cf19e86520f48c18f5a to your computer and use it in GitHub Desktop.
Complete htaccess code for remove file extension + add a trailing slash like wordpress
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 | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}.php -f | |
RewriteRule ^(.*)$ $1.php | |
#RewriteRule ^([a-z]+)\/?$ $1.php [NC] | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}.html -f | |
RewriteRule ^(.*)$ $1.html | |
#RewriteRule ^([a-z]+)\/?$ $1.html [NC] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment