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.

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:
    1
    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:
    2
    Trophy Points:
    18
    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
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    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]
    
     
  4. rjnsmith

    rjnsmith Member

    Joined:
    Nov 18, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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,475
    Likes Received:
    20
    Trophy Points:
    38
    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.
     
  6. rjnsmith

    rjnsmith Member

    Joined:
    Nov 18, 2005
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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:
    1
    So any idea why its not working?
     
Loading...

Share This Page