homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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

Msg#: 4378115 posted 9:06 pm on Oct 22, 2011 (gmt 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

2. New Domain Title

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?




Msg#: 4378115 posted 5:31 pm on Oct 23, 2011 (gmt 0)



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

Msg#: 4378115 posted 6:22 pm on Oct 23, 2011 (gmt 0)

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.


WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4378115 posted 6:26 pm on Oct 23, 2011 (gmt 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved