Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    3

    Default Pointing domain2.com to sub.domain1.com

    I have a customer who has setup a subdomain which is sub.domain.com he wants domain2.com to point to that subdomain. I have tried EVERYTHING I could think of and all posts here and have not figured it out yet.. Here is what I have the httpd.conf set like now for the subdomain tag.

    <VirtualHost MY IP>
    BytesLog domlogs/sub.domain.com-bytes_log
    User admin1
    Group admin1
    ServerName domain2.org
    ServerAlias sub.domain.com *.domain.com
    ServerAdmin wwwadmin@domain.com
    DocumentRoot /home/comprel/public_html/sub
    CustomLog domlogs/sub.domain.com combined
    ScriptAlias /cgi-bin/ /home/admin1/public_html/sub/cgi-bin/
    User admin1
    Group admin1
    </VirtualHost>

    I have even tried adding an A record for domain2.com in the zone file and nothing seems to work. It looks like it has happened to people before, but none of those fixes have worked for me yet. Thanks in advance.

    cPanel.net Support Ticket Number:

  2. #2
    Member
    Join Date
    Feb 2003
    Posts
    291

    Default

    You can write a simple php script with 'header location' to point all the request comming to the domain to that sumdomain.

    cPanel.net Support Ticket Number:
    Mitul

  3. #3
    Member
    Join Date
    Apr 2003
    Posts
    10

    Default

    I would also love to be able to do this, I have no idea how to write this simple PHP script though, anyone any ideas?

    cPanel.net Support Ticket Number:

  4. #4
    Member
    Join Date
    Sep 2002
    Posts
    580

    Default

    Why not edit his .htaccess file to forward to it?

    cPanel.net Support Ticket Number:

  5. #5
    Member vishal's Avatar
    Join Date
    Jan 2003
    Location
    India
    Posts
    343

    Default

    Originally posted by NNNils
    Why not edit his .htaccess file to forward to it?

    cPanel.net Support Ticket Number:
    Use a PHP Script with header:

    pico index.php

    <? header("Location:sub/index.php"); ?>
    Save and Exit.

    Hope this helps!

    Regars,

    cPanel.net Support Ticket Number:
    rh_linuxion

    It is very simple to be Happy but it is very difficult to be Simple.

  6. #6
    Member
    Join Date
    Mar 2002
    Location
    Alberta, Canada
    Posts
    1,509

    Default

    Have you tried using the 'Add-on Doman' feature in Cpanel? This is exactly what it was designed for.

    If 'domain2.com' is a properly registered Domain name, then there is no problem.

    cPanel.net Support Ticket Number:
    Helping people Host, Create, and Maintain their Web Site
    Also providing Server Admin Services - setup / troubleshooting

    http://potentproducts.com/

  7. #7
    Member
    Join Date
    Jun 2003
    Posts
    6

    Default

    Create a index.html file to put in the 1st domain that you want forwarded.

    In that index file place:

    <FRAMESET ROWS="*,0" FRAMEBORDER=0 BORDER=0 FRAMESPACING=0>
    <FRAME SRC="http://domain2.com/" NORESIZE>
    </FRAMESET>

    with domain2 being where you want it to go to.

    The above code should be placed in the "head" section of the html doc.

    Plesk does this all for you, but not C-Panel.

    cPanel.net Support Ticket Number:

Similar Threads & Tags
Similar threads

  1. 301 redirect from domain1 to domain2
    By greenweb in forum New User Questions
    Replies: 1
    Last Post: 06-13-2011, 03:44 PM
  2. Exim: userA@domain1.com to userA@domain2.com
    By cgarvey in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-28-2004, 05:52 AM
  3. How to have domain2.com point to domain1.com's content?
    By fog in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-08-2002, 07:49 PM
  4. email@domain2.com forward to email@domain1.com
    By AlaskanWolf in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-28-2002, 08:44 AM
  5. How can I have domain1 and domain2 on the same account?
    By hedgehog in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 11-06-2001, 03:14 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube