Redirecting your old domain using mod_rewrite

Status
Not open for further replies.

mneylon

Administrator
Staff member
For a number of very boring reasons I had setup a forum for browse.ie which I then decided to get rid of.

I didn't want to lose any backlinks to it etc., so rather than remove it completely I first pointed it here, but I knew that I could get into trouble with G for duplicate content.

The simplest and most graceful solution was to use Apache mod_rewrite to redirect the traffic from the original hostname to the new one:

Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} forum.browse.ie$
RewriteRule ^(.+) http://forum.search.ie/$1 [L,R=301]

So if you arrive here using the old hostname you will be redirected to the new one gracefully :)
 

cr8or

New Member
I had to do that on one of my old websites .. google did'nt seem to mind one bit.
 
Status
Not open for further replies.
Top