The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Forward to sub directory?

Discussion in 'General Discussion' started by zerofear, Nov 7, 2004.

  1. zerofear

    zerofear Registered

    Joined:
    Nov 7, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to set it up so that when I go to my domain www.mydomain.com it automatically sends you to www.mydomain.com/commerce/

    How can I set this up in WHM? I have been trying some things in editing the DNS zone, but so far no luck. Any advice?

    Thanks.
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    use redirects in your Cpanel
     
  3. zerofear

    zerofear Registered

    Joined:
    Nov 7, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    root redirects do not work

    I have tried doing this. But whenever I set it up to do a redirect from the root "/", it causes the page to either load over and over and over again, or tries to connect to www.mydomain.com/commerce/commerce/commerce and just keeps adding commerce on until an error.

    Any other ideas?
     
  4. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    create an index.php file in your root and insert the following:


    <?php

    header("Location: /commerce/");

    ?>



    Make sure the <?php is the first character on the first line of the index.php file.
     
Loading...

Share This Page