Forums / Installing on a Linux/Unix Server / redirecting to new domain on same server

redirecting to new domain on same server

Views: 1,239

Results 1 to 2 of 2
10 Jun 2011, 4:19 AM
#1
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

redirecting to new domain on same server

Hi

Site is changing its domain name (so its on the same server), so i just want to redirect any traffic going to the old name to the new name, site structure is identical etc the old domain name is still live and pointed at the server and will be for the forseeable future

I just want to confirm this will work, as i have never redirected the main domain on a server to the same server

RewriteEngine on

RewriteCond %{HTTP_HOST} ^oldname.com$
RewriteRule ^(.*)$ http://newname.com$1 [R=301,L]

obviously I will be changing the configure files accordingly.

I also assume paypal will need to be reconfigured (or will it work ok)

Webzings Design
Semi retired from Web Design

12 Jun 2011, 11:00 PM
#2
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: redirecting to new domain on same server

Anyone know I just want to make sure before i make the switch as i can't test it till i have everything sorted

Webzings Design
Semi retired from Web Design