Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-25-2012, 07:30 PM   PM User | #1
Azam.net
New Coder

 
Join Date: Nov 2003
Location: Bloomsbury, London
Posts: 96
Thanks: 3
Thanked 0 Times in 0 Posts
Azam.net is an unknown quantity at this point
Lightbulb .htaccess redirect to show add-on domain as domain name in serps

We have a shared hosting account with Hostgator.

I've never had an issue like this with an add-on domain name with any web host: instead of showing as addondomainname.com it's showing as addondomainname.maindomainname.com in Google's results.

The domain name has been configured properly in cpanel and all our other add-on domain names are showing just the domain name in the SERPs.

Somebody suggested a write a .htaccess redirect.

My .htaccess knowledge is not that great, so excuse the basic question. I've looked on several sites, but not been able to find the right code.

I've tried adding the following to the add-on domain's directory, but it still shows addondomain.maindomain.com in my browser toolbar:

RewriteCond %{HTTP_HOST} ^addondomain.maindomain.com [NC]
RewriteRule (.*) http://www.addondomain.com [R=301,L]

What should the .htaccess code be please?

Thanks.
__________________
Domain Exhibit - premium domain names and websites with significant traffic | quote Coding Forums for additional 15% discount!
Coding Freebies - free scripts and software worth hundreds of dollars
Azam.net is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:09 AM.


Advertisement
Log in to turn off these ads.