Welcome to WebmasterWorld Guest from 54.146.221.231

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

301 created subdomain

2 sites share the same .htaccess file and it's creating problems

     
9:06 pm on Oct 22, 2011 (gmt 0)

New User

5+ Year Member

joined:Jan 17, 2011
posts:38
votes: 0


I have 2 sites; I was forced, for legal reasons, to abandon my first domain and use the new one. Problem is they are both on the same IP and share the same .htaccess file. I am seeing the old domain still rank for product pages, but content is deindexed, and I wasn't able to 301 from the old domain to the new one.

I figured out a redirect to tell the old domain to redirect to the new one; I thought it had worked. But now I am seeing the new domain register in Yahoo! Site Explorer as two subdomains, both the same new URL, but have the current title and the old title. So to be clear, in Yahoo! Site Explorer, under the subdomains tab, I am seeing:

1. Old Domain Title
www.new-domain-name.com

2. New Domain Title
www.new-domain-name.com

Here is the redirect I am using:

RewriteCond %{HTTP_HOST} ^(www\.)?old-domain-name.com [NC]
RewriteRule ^(.*)$ [new-domain-name.com...] [L,R=301]

Is there a better way to do this? I was thinking of pointing the nameservers of the old domain address to a different server so I could use a different .htaccess file, I feel like that would solve the entire problem I am seeing.

Anyone ever seen this?

Thanks!
5:31 pm on Oct 23, 2011 (gmt 0)

New User

5+ Year Member

joined:Jan 17, 2011
posts:38
votes: 0


bump...
6:22 pm on Oct 23, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member wilderness is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Nov 11, 2001
posts:5408
votes: 2


You may bump this fifty times and contributors are not going to spend their time duplication multiple threads that are nearly identical to yours and are active threads in the first page of this forums threads.
6:26 pm on Oct 23, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


It matters not a jot where the file is located, just as long as it is in a place that the old domain name resolves to.

If you type "old-domain" in the browser and the URL in the browser address bar changes to "new-domain" then the redirect is working fine.

Escape the literal period in the RegEx pattern.