Forum Moderators: phranque

Message Too Old, No Replies

301 redirect old domain to new domain using same hosting account

         

dailypress

2:24 am on Jun 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i moved all my files and folders from example.com to example.org
i used a htaccess and am having trouble fw'ing the .com to .org

example.com is still showing the index page although I have used a redirect htaccess

i used the following code:

#Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com$[OR]
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^(.*)$ http://www.example.org/$1 [R=301,L]

thecoalman

7:34 am on Jun 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I know there is a difference between redirect and rewrite however is there under these circumstances? I just moved most of the content of one domain to another without a bump in the road, it was forum that really didn't have much to do with the domain. Actually traffic has gone up. In my case the forum was in a sub directory so it was:

redirect 301 /somefolder/ http://www.example.org/

Yours would look like:

redirect 301 / http://www.example.org/

dailypress

8:10 pm on Jun 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thecoalman: i didnt understand your response.

i have a few websites under ONE hosting account so OLDDOMAIN.com is pointing to example.com/olddomain
and the new one is pointing to example.com/newdomain

The 301 redirect doesnt work and I am thinking its because the htaccess should be uploaded in the root directory which basically FW's ALL my domains to the newdomain. I only want to redirect one website (under the olddomain folder) to the new one.

thanks,

dailypress

9:15 pm on Jun 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I called my registrar, they suggested to point the example.com to the example.org IP and that I should change the "A" record.

I should basically point the domain (example.com) to the dot org folder (example.com/newdomain)

im confused!

dailypress

1:40 am on Jun 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok, now my registrar says I need to setup another account with them cause I cant do the redirect using one account! (using IPOWER)

any advice?

g1smd

11:44 am on Jun 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Don't end-anchor the domain name, and make the code more efficient like this:

RewriteCond %{HTTP_HOST} ^(www.)?example.com
RewriteCond %{HTTP_HOST} ^example.org

You should point both domains at the same folder.

dailypress

4:42 pm on Jun 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I had issued with my registrar but fixed the problem using my friends account.

thanks. issue finally resolved! :)