Solved

Domain re direction and HTACCESS question

Posted on 2009-04-10
8
402 Views
Last Modified: 2013-11-30
I have two domains hosted in one hosting account.
domA.com is the primary domain and Domb.com is parked in that hosting account.
I run email from domB.com and that it.

At the moment I have domB configured so that when www.domB.com is typed into an address bar the website from www.domA.com shows up, but with www.domB as its URL.
What I need to do is reconfigure domB so that not only does the website of domA.com show up but domA is displayed in the URL.

I spoke with the hosts and they were not that much help and gave me some very basic info in dropping in a HTACCESS file however I am a little lost. Can anyone assist?
0
Comment
Question by:Neil_Bradley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 6

Expert Comment

by:gmaddockgreene
ID: 24119163
Hi,

If I understand you correctly you are therefore wanting to re-direct domB to domA

This is a 301 redirect.

your .htaccess file needs to read:

(index.php is replaced with the index page ref)


RewriteEngine On
Redirect 301 /index.php http://www.domA.com

Open in new window

0
 
LVL 5

Accepted Solution

by:
comeran earned 125 total points
ID: 24119492
You need to use a 301, but the above rule will not forward everything. Cut and paste the following code into a file, rename it .htaccess remember to put the . in front of it. Change newdomain.com to the domain you want the site to point TO and then upload the .htaccess file to the site that will forward.

Thats it  :)   Then anything that goes to domB.com will forward over not just index.php.

Com-
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Open in new window

0
 
LVL 6

Expert Comment

by:gmaddockgreene
ID: 24119507
Good job comeran :)

That actually helps me too.

Gary
0
Schedule a Tour of the ATEN booth at InfoComm 2017

Tour the ATEN booth to see the the Latest Addition to the Modular Matrix Switch Series, New 4K HDMI Over IP Extender and more! Enter ATEN's Ultimate Giveaway Sweepstakes for a chance to win one of several great prizes, including an ATEN US7220 2-Port Thunderbolt 2 Sharing Switch!

 
LVL 5

Expert Comment

by:comeran
ID: 24119538
Glad I could help  :)
0
 
LVL 6

Expert Comment

by:gmaddockgreene
ID: 24119550
Although, does that not cause a loop?
0
 
LVL 5

Expert Comment

by:comeran
ID: 24119594
No, it just forwards every page to the new domain:

domB.com/whatever.html will forward to domA.com/whatever.html

0
 
LVL 6

Expert Comment

by:gmaddockgreene
ID: 24121179
Did I not deserve something for the assist Neil?

And immediate intial help response?

Glad to help.
0
 
LVL 5

Author Comment

by:Neil_Bradley
ID: 24123295
Cheers, thatv was brilliant. It solved the problem right away.
Many thanks.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question