July 9th 2010
RT @alanogden: hard work moving office today. All in and happy now!

July 9th 2010
obviously our previous tweet meant Friday 9th July :) Thanks to those who let us know!

July 7th 2010
Blog: Slackware, The love affair http://3dpixel.net/blog/slackware-the-love-affair/

July 6th 2010
we are moving to new office premises Friday 6th July. Moving up in the world (literally).

You are here: Home » FAQ » mod_rewrite

mod_rewrite

Mod_rewrite enables you to do the following:

Enabling mod_rewrite

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

Some Examples

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]



Tell Someone About This Page