?
Solved

Domain re direction and HTACCESS question

Posted on 2009-04-10
8
Medium Priority
?
404 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 500 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
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
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…
Suggested Courses

752 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