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.

Possible to force www in the URL via WHM/cPanel instead of via .htaccess?

Discussion in 'General Discussion' started by sm9, Jan 23, 2012.

  1. sm9

    sm9 Active Member

    Joined:
    Oct 10, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Hi there,

    Is it possible to force a site to use www in the URL using cPanel or WHM?

    I normally do this with .htaccess rules, but the less rules I have in there the better, especially when there's a lot of them.

    Thanks for any advice,

    Ste
     
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Re: Possible to force www in the URL via WHM/cPanel instead of via .htacces

    Please go through Redirects and you will be able to setup redirects from cPanel.
     
  3. sm9

    sm9 Active Member

    Joined:
    Oct 10, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Re: Possible to force www in the URL via WHM/cPanel instead of via .htacces

    Thanks for the reply.

    I've noticed that using the Redirects section only adds the rules to my .htaccess file anyway (and the redirects didn't play nicely with my CMS, adding index.php into the redirected URL), so I'm thinking there's probably no better option than doing what I was doing anyway.

    Thanks,

    Ste
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: Possible to force www in the URL via WHM/cPanel instead of via .htacces

    The only ways for an account user to redirect would be to use either .htaccess rewrite rules or a meta redirect in the page's code. cPanel will use the .htaccess method for our redirection area as already discussed.
     
  5. sm9

    sm9 Active Member

    Joined:
    Oct 10, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Re: Possible to force www in the URL via WHM/cPanel instead of via .htacces

    Okay, thanks Tristan.
     
Loading...

Share This Page