Results 1 to 3 of 3

Thread: How to point Parked domain to Main domain

  1. #1
    gopal
    Guest

    Default How to point Parked domain to Main domain

    For Example I want point may Parked domain "aa.com" to my main domain "aa.ca". By default both are pointing to same location but when I accessing the aa.com in the browser it should redirect to "aa.ca" for this I have created a Sub domain in the name of "aa" and set the addon domain "aa.com", and I have created the .htaccess file inside the sub-folder and added the line like,

    .htaccess file :-

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^aa.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.aa.com$
    RewriteRule ^(.*)$ http://aa.ca [R=301,L]

    it works fine

    aa.com --> public_html/aa --->aa.ca

  2. #2
    Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    6

    Default

    That was really wonderful. But there is a small problem.

    aa.com will redirect to http://aa.ca
    www.aa.com will redirect to http://aa.ca

    But...
    aa.com/anotherfile redirects to http://aa.ca instead of http://aa.ca/anotherfile

    Could you please give a solution for this?

    Regards,
    Kidz

  3. #3
    Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    6

    Default

    Okay!!! Seems like I found it. My problem was a bit different.
    all url should redirect to www. ie., domainname.com should automatically point to www.domainname.com. The .htaccess code for this is given below.

    <code>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www..* [NC]
    RewriteRule ^(.*) http://www.%{HTTP_HOST}$1 [R=301]
    </code>

    But this creates problem with frontpage and the workaround that I found is to insert the code inside the virtualhost entry of the domain instead of the .htaccess. Beware!!! take a backup of your httpd.conf before doing it.

    Regards,
    Kidz

Similar Threads

  1. switch main domain and parked domain in account
    By bangsters in forum cPanel & WHM Discussions
    Replies: 3
    Last Post: 03-08-2010, 03:15 PM
  2. Can I point a parked domain to a folder on the main domain?
    By rligg in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 04-04-2008, 12:12 PM
  3. Parked domain show up main domain on URL Bar
    By Jorge in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 06-25-2006, 01:02 PM
  4. How to point a parked domain to an addon domain?
    By Carl Janssen in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 11-04-2005, 06:58 AM
  5. subdomain on parked domain leads to main domain?...
    By Devil Inside in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 07-17-2004, 10:47 AM