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.

Redirecting

Discussion in 'General Discussion' started by Finkinstein, Apr 26, 2003.

  1. Finkinstein

    Finkinstein Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    I am trying to get http://domain.net/ to redirect to http://domain.net/home/ but not with much luck.

    At first I tried it with a / for the first entry, causing an infinite loop.
    Then, I edited the .htaccess file manually and set it to /index.php.

    Now I have another problem, subdomain's dont work... they all go to http://domain.net/home/ I am pretty sure their index's are index.php, which is probably the problem...


    Any Ideas?
     
  2. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
    You're tryign to alias domain.com to domain.com/home? Or do you just want to redirect domain.com's index file to domain.com/home?

    If the former, then cant you just edit the accoutn so the home directory is /home/user/public_html/home?

    If the latter, just make a file called index.php in domain.com like this:

    PHP:
    <?
    header("Location: [url]http://domain.com/home[/url]");
    ?>
    Not sure if that helped or not...
     
  3. Finkinstein

    Finkinstein Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Never thought about changing the alias. Good idea.

    At the moment I have a php redirect, it's working fine with no noticable difference so I will leave it as it is.

    Thanks for your help.
     
  4. bmcclure

    bmcclure Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    196
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Racine, WI
  5. Finkinstein

    Finkinstein Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    Tha'ts what I did, but then I would have to put a .htaccess in the other folders to cancel out this one.

    All my subdomains went screwif.
     
  6. Juanra

    Juanra Well-Known Member

    Joined:
    Sep 22, 2001
    Messages:
    777
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Spain
    You can also change the DocumentRoot directive for the domain in httpd.conf.
     
Loading...

Share This Page