Learn how to Make Money Online doing freelancing, Affiliate Marketing, Blogging and many more ...
Go4Expert
Go4Expert RSS Feed

Go Back   Programming and SEO Forum >  Go4Expert > Queries and Discussion > Search Engine > Search Engine Optimization (SEO)

Reply  Copy HTML to Clipboard  Copy BBCode to Clipboard  | More
 
Bookmarks Thread Tools Search this Thread Display Modes
Old 06-19-2007, 10:30 PM   #1
Newbie Member
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
rdubayah is on a distinguished road

301 redirect of subdomain.domain


I currently have a domain that started as one of those free web pages 6 years ago.

The problem is search engines (one in particular) picked up the original domain subdomain
and also just the newer domain. www.newdomain.com over the years.
I have a sitemap that give the correct addresses but it appears a redirect is required?

Most search engines have corrected automatically but (G) has both, held the original and it won't let it go and splits the two addresses.(Both are listed same content)
Originally it was www.subdomain.domain.com

We have a domain that has been registered for several years and the web host advises because the subdomain is now actually the newdomain I need to redirect.

The Redirect 301 / http://www.newdomain.com/ to redirect the entire site causes a endless loop (both original www.subdomain.domain.com and www.newdomain.com are using the same .htaccess file because they are the same directory.

I believe I need to redirect only the calls for the original www.subdomain.domain.com
with a filter but have had no success in attempts to write it.

thanks for any help in advance
rdubayah is offline   Reply With Quote
Old 06-20-2007, 08:16 AM   #2
Go4Expert Founder
 
shabbir's Avatar
 
Join Date: Jul 2004
Location: On Earth
Posts: 12,516
Thanks: 53
Thanked 276 Times in 215 Posts
Rep Power: 10
shabbir has much to be proud ofshabbir has much to be proud ofshabbir has much to be proud ofshabbir has much to be proud ofshabbir has much to be proud ofshabbir has much to be proud ofshabbir has much to be proud ofshabbir has much to be proud of
Send a message via Yahoo to shabbir

Re: 301 redirect of subdomain.domain


You need to be putting the following
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST}//s%{HTTPS} ^subdomain\.(.*)//((s)on|s.*)$ [NC]
RewriteRule ^ http%3://%1%{REQUEST_URI} [L,R=301]
It will redirect you from the subdomain.newdomain.com to newdomain.com. You could refer to SEO FAQ's also
shabbir is offline   Reply With Quote
Old 06-20-2007, 10:56 AM   #3
Newbie Member
 
Join Date: Jun 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
rdubayah is on a distinguished road

Re: 301 redirect of subdomain.domain


Thanks I will give it a try also. I have been testing and found that the following works also although it took some trial, first I was just getting all the pages redirecting to the home page. I think just not ending the session in the browser was keeping the results from changing.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} www.origsubdomain.domain.com$ [NC]
RewriteRule (.*)$ http://www.origsubdomain.com/$1 [R=301,L]
rdubayah is offline   Reply With Quote
Reply  Copy HTML to Clipboard  Copy BBCode to Clipboard  | More


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Bookmarks

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads / Articles
Thread Thread Starter Forum Replies Last Post
Search Engine Optimization FAQ's shabbir Search Engine Optimization (SEO) 24 07-16-2010 06:07 PM
Addon, Sub Domains and 301 redirect... HELP ! here's jonny Search Engine Optimization (SEO) 32 04-05-2007 08:17 PM
.htaccess 301 redirect for subdomains GotWeb? Search Engine Optimization (SEO) 13 01-10-2007 10:31 AM
redirect i/o goT MFC / Win32 9 06-20-2006 07:49 PM
301 permanent redirect in PHP coderzone Search Engine Optimization (SEO) 3 02-24-2006 07:13 PM

 

All times are GMT +5.5. The time now is 05:25 AM.