08000 337977
3DPixel Sales PhoneYou are here: Home » FAQ » mod_rewrite
Mod_rewrite enables you to do the following:
mod_rewrite is active on all 3DPixel.net accounts. It is not a plesk control panel function that can be enabled. It is wholly and exclusively controlled by the use of .htaccess files.
The code for .htaccess mod_rewrites, before any code MUST be the following:
#Enable mod_rewrite
RewriteEngine On
Redirect a specific IP to another site:
#redirect IP
RewriteCond %{REMOTE_ADDR} ^123.123.123.123$
RewriteRule .* http://someotherwebsite/link.htm [R=301,L]
Remove the index.php from the homepage to make it prettier:
#redirects index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ http://www.yoursite.net/ [R=301,L]
Make an Search Engine optimised link:
#make nice-url-here show somepage.php RewriteRule ^nice-url-here /somepage.php [L]