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.

Redirects problem...

Discussion in 'General Discussion' started by Brian Cruz, Jun 30, 2003.

  1. Brian Cruz

    Brian Cruz Member

    Joined:
    Jun 23, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Okay, here's my problem. I want to redirect anyone going to www.mysite.com/forums to forums.mysite.com. Creating this redirect in CPanel is simple and it works fine. But...

    It seems that this redirect also applies to all my other subdomains. For example, if I go to subdomain.mysite.com/forums, it takes me to forums.mysite.com. Since I have several subdomains with their own forums directory, this causes quite a problem. How can I change this redirect to only effect my main domain and not all my subdomains? Thanks.

    cPanel.net Support Ticket Number:
     
  2. Brian Cruz

    Brian Cruz Member

    Joined:
    Jun 23, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Surely there must be a way...

    cPanel.net Support Ticket Number:
     
  3. nevans

    nevans Member

    Joined:
    Jun 11, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I think you need to edit the .htaccess fine in the /forums dir. remove the "1" try it but recreate a .htaccess.bak file in case it doesn't work.

    -- Nick

    cPanel.net Support Ticket Number:
     
  4. Brian Cruz

    Brian Cruz Member

    Joined:
    Jun 23, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I don't quite understand.. the .htaccess file is my public_html folder, not /forums, and there's no "1"in it.

    cPanel.net Support Ticket Number:
     
  5. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Let's see,

    domain.com/forums/ - is redirected to - forums.domain.com/

    That's correct as your main account (domain.com) will have a dir. called 'forums' which, I presume, has been setup in Cpanel as a Sub-domain.

    I think where the confusion is, is in the Sub-domain setup and path structure. Each Sub-domain gets it's own dir. and is called whatever you want -- as long as the Sub-domain / dir. name is not already being used.

    If you create 'subdomain1.domain.com' then, in your main account, you have a dir. called 'subdomain1' and in that directory you create a dir. called 'forums'. This would give the following dir. structure within your main account:

    /forums/
    /subdomain1/forums/

    All you would need to do is to make sure, in your redirection, that you are using the correct path.

    cPanel.net Support Ticket Number:
     
  6. Brian Cruz

    Brian Cruz Member

    Joined:
    Jun 23, 2002
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Nevermind, I finally figured this out. I added

    Redirect 301 /forums http://forums.mysite.com

    to my main domain's virtual host entry in the httpd.conf file. Works like a charm!

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page