Created
October 28, 2015 18:57
-
-
Save jonathanablanida/6247118b5b969df16a42 to your computer and use it in GitHub Desktop.
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
#Jae Redirect | |
Options +FollowSymLinks -MultiViews | |
RewriteEngine On | |
RewriteBase / | |
# This will redirect you from http://www.example.com/username.php to http://www.example.com/username externally | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] | |
RewriteRule ^ %1 [R,L] | |
# This will redirect you from http://www.example.com/username to http://www.example.com/username internally | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}.php -f | |
RewriteRule ^(.*?)/?$ $1.php [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment