Created
March 5, 2012 12:58
-
-
Save skvggor/1978211 to your computer and use it in GitHub Desktop.
htaccess, Cesar
This file contains hidden or 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
############## | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !^(.*)\.(.*)$ | |
RewriteRule ^(.*)$ %{REQUEST_URI}.php [R] | |
############# | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME}\.php -f | |
RewriteRule ^([^/]+)/$ $1.php | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^([^\.]+)$ $1.php [NC,L] | |
$url = parse_url($_SERVER['PATH_INFO'], PHP_URL_PATH); | |
$url = explode(’/', $url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment