Created
February 22, 2014 15:27
-
-
Save Shaz3e/9156586 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
.htaccess | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ $1.php [L,QSA] | |
# http://domain/about -> http://domain/about.php | |
-------------------------------------------------- | |
.htaccess | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] | |
# http://domain/about -> http://domain/index.php?q=about | |
<?php | |
// $url_data is an array | |
$url_data = explode("/",$HTTP_SERVER_VARS['PATH_INFO']); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment