/ Published in: Apache

This is an .htaccess file for a mod_rewrite php url handler.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#Disables listing of files in directorys IndexIgnore * #Turns mod_rewrite on RewriteEngine On #If directory exists ignore RewriteRule RewriteCond %{REQUEST_FILENAME} !-d #If file exists ignore RewriteRule RewriteCond %{REQUEST_FILENAME} !-f #If link exists ignore RewriteRule RewriteCond %{REQUEST_FILENAME} !-l #Rewrite url and pass to variable $url(in php script use $_REQUEST['url'] #then write url handler to parse url in index.php) RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
Comments
