Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8420789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:57:13+00:00 2026-06-10T02:57:13+00:00

I have a site hosted at Network Solutions, along with two domains. OldDomain used

  • 0

I have a site hosted at Network Solutions, along with two domains. “OldDomain” used to point to hosting account, but now “NewDomain” points to host.

PROBLEM: Redirecting “OldDomain” doesn’t work without creating redirect loops.

I’ve tried the following:

1) Redirecting OldDomain (with/out “www”), plus redirect non-www for NewDomain:

RewriteCond %{HTTP_HOST} ^www.olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^olddomain.com$
RewriteCond %{HTTP_HOST} ^newdomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,NC]

2) Redirect using PHP header:

$dom = $_SERVER['HTTP_HOST'];
if(strripos($dom, 'olddomain.com') >= 0) {
header("HTTP/1.1 301 Moved Permanently"); 
header("Location: http://www.newdomain.com/");
}

Option #1 doesn’t do anything. Option #2 puts me in a redirect loop even with the first two RewriteCond rules commented out.

I’ve done many .htaccess redirects before, but this one is giving me a headache as to why it’s not acting right. Is this just a Network Solutions issue? I’ve never had problems with any other hosts. By the way, NS support tells me I have to pay to forward OldDomain to NewDomain because it’s currently not pointing to a hosting package. If that’s the case, why can’t I point both domains to the same hosting package and at least use the PHP redirect in the header of the index page??

THANKS for any help on this!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:57:15+00:00Added an answer on June 10, 2026 at 2:57 am

    Option 1 doesn’t do anything because you have this logic in your conditions

    • Host is www.olddomain.com
    • OR host is olddomain.com
    • AND host is newdomain.com

    Obviously, the host can’t both be newdomain.com and either one of the old domains. Try adding an additional [OR] to that and some [NC], too:

    RewriteCond %{HTTP_HOST} ^www.olddomain.com$ [OR,NC]
    RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR,NC]
    RewriteCond %{HTTP_HOST} ^newdomain.com [NC]
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,NC]
    

    Option 2, you have this to see if the host contains olddomain.com:

    if(strripos($dom, 'olddomain.com') >= 0) {
    

    Problem here is strripos() returns FALSE (which is also a 0) if string isn’t found, which means if $dom was www.newdomain.com, it would return FALSE, or 0, and the >= 0 would be true, thus redirecting again. You need to do something like this:

    if(strlen(strstr($dom, 'olddomain.com')) > 0) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have web site hosted on shared hosting account which is managed by CPanel.
I have a Windows Azure site which is deployed to two separate hosted services.
I have my site hosted on IIS hosting. Site has feature that needs calling
Here the problem. I have my site hosted on a shared hosting for asp.net
I have a site that is hosted on inmotion hosting and requires a phpMailer
I would like to extend a sharepoint site hosted by Network solutions by creating
I have a site [hosted on DreamHost], using WordPress for the main content, but
Say I have a site hosted on example.com , now I want each of
I have an ASP.NET MVC 3 site hosted on a normal hosting provider and
I have a network of websites hosted on two different servers, server1 and server2.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.