you are here: codestackercodes [RSS].htaccess examples

.htaccess examples

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ $1.php [L,QSA] 
# http://domain/about -> http://domain/about.php 

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] 
# http://domain/about -> http://domain/index.php?q=about 

Comments