Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Question about redirect...

Discussion in 'General Discussion' started by rjnsmith, Jan 25, 2006.

  1. rjnsmith

    rjnsmith Member

    Joined:
    Nov 18, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    Hi all,

    Is it possable to redirect from like http://domain.com/billing to https://domain.com ? I cant seem to do this in cPanel, and I want to do it, because when useres login, I dont want them to have to manually type it in if they go to that right away.

    If someone could show me how to do this, that would be great!
    Thanks,
    Ryan
     
  2. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    Planet Earth
    For having https://domain.com , you need to purchase the SSL certificate for your domain.com and then you can redirect simply to https://domain.com
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    If you already do have a your site secured with SSL and non-SSL access, then you can achieve this using a .htaccess file at the top og the domain (within public_html/):
    Code:
         RewriteEngine On
         RewriteCond %{SERVER_PORT} !^443$
         RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [L,R]
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. rjnsmith

    rjnsmith Member

    Joined:
    Nov 18, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    So should I just copy and past that code at the top into .htaccess?
    And yes, we do have SSL from Geo Trust, but we only want users to login to SSL when they login to billing.

    You can not make a redirect within the cPanel
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    In that case, put it in a .htaccess file within the billing/ directory, not at the top level of the domain. And yes, you can paste it into the .htaccess file as-is.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. rjnsmith

    rjnsmith Member

    Joined:
    Nov 18, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    When I go to it, it has errors.

    http://ssxhost.com/billing ~ 404 error

    https://ssxhost.com/billing ~ Page can not be found

    I dont mean to put my site here, but I needed to do it to show you.

    Thanks,
    Ryan

    EDIT: I removed it, so no one is worried about anything because of it not being there.
    Ryan
     
    #6 rjnsmith, Jan 25, 2006
    Last edited: Jan 25, 2006
  7. rjnsmith

    rjnsmith Member

    Joined:
    Nov 18, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    So any idea why its not working?
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice