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.

https to http - backwards huh

Discussion in 'General Discussion' started by t9clkclnr, Apr 6, 2005.

  1. t9clkclnr

    t9clkclnr Well-Known Member

    Joined:
    Jun 11, 2004
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Southern California
    I want to make users who access this:

    https://www.mydomain.com

    to be redirected to this:

    http://mydomain.com

    I do have code on my index page that checks HTTPS and will redirect but it;s not happening before the headers are sent to the server and the 401 auth error is returned telling users the SSL cert name does not match.

    how can i redirect the users to the non-secure site immediatley before the 401 is issued to the client?

    thank you.
     
  2. t9clkclnr

    t9clkclnr Well-Known Member

    Joined:
    Jun 11, 2004
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Southern California
    one more thing...

    access to anthing in the root of mydomain.com should not be allowed to access the site via https

    i want to only allow https access to subfolder pages.
     
  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
    You cannot do this in a html file as the act of connecting via SSL sets up the encrypted connection.

    You might be able to do it in either a .htaccess file or within the domains VirtualHost container for the 443 port using a mod_rewrite rule - but without testing it, I somehow doubt that it would work that way either.
     
  4. Kerstin

    Kerstin Well-Known Member

    Joined:
    Apr 9, 2005
    Messages:
    136
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Berlin
    Your link t9clkclnr are interested :) for unsecure the https encryption to the forum ;)
     
Loading...

Share This Page