Created
March 7, 2016 03:57
-
-
Save razuro/872653821fb8bff9db6e to your computer and use it in GitHub Desktop.
Remove .php trail .htaccess
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
# Turn on the rewrite engine | |
RewriteEngine on | |
# If the request doesn't end in .php (Case insensitive) continue processing rules | |
RewriteCond %{REQUEST_URI} !\.php$ [NC] | |
# If the request doesn't end in a slash continue processing the rules | |
RewriteCond %{REQUEST_URI} [^/]$ | |
# If the requested filename is not a directory, | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# and if the requested filename is not a regular file that exists, | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# and if the requested filename is not a symbolic link, | |
RewriteCond %{REQUEST_FILENAME} !-l | |
# Rewrite the request with a .php extension. L means this is the 'Last' rule | |
RewriteRule ^(.*) $1.php [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment