htaccess help http to https

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nibbi
    Confirmed User
    • Sep 2002
    • 104

    #1

    htaccess help http to https

    Using htaccess, I want to be able to ensure that someone is using https when they are hitting any page in a directory.

    There must be a way to do this in htaccess, but I havent been able to figure it out.

    example:

    someone hits this page:

    http://www.mysite.com/foo/test.html

    they are redirected to

    https://www.mysite.com/foo/test.html

    Anyone know how to write the htaccess file?


    Thanks
    http://www.xRag.com
  • pussyluver
    Clueless OleMan
    • Mar 2003
    • 11009

    #2
    bump for nibbi


    same nibbi that works with sixzeros?

    Comment

    • juicylinks
      So Fucking Banned
      • Apr 2001
      • 122992

      #3
      Originally posted by pussyluver
      bump for nibbi


      same nibbi that works with sixzeros?

      yup

      Comment

      • nibbi
        Confirmed User
        • Sep 2002
        • 104

        #4
        Hi, thanks.

        Yeah, I'm the guy that works with sixzeros.
        http://www.xRag.com

        Comment

        • pussyluver
          Clueless OleMan
          • Mar 2003
          • 11009

          #5
          Wish I had the answer for you. You have always been a big help on tech questions. I know you've looked around google. Trying to think who on the board whould know.

          If ya keep the thread up on page one, maybe the evening - night crew will have the answer.

          I'll stumble around a bit on some of my bookmarks on htaccess, see if anything comes up.

          Comment

          • nibbi
            Confirmed User
            • Sep 2002
            • 104

            #6
            The closest I have been able to come is this..


            RewriteEngine on
            RewriteCond %[SERVER_PORT} !^443$
            RewriteRule ^(.*)?$ https://% [SERVER_NAME}/$1 [L,R]

            *note, I added [ before the word SERVER because the site would have stripped out the open curly bracket


            This works to a point. If the file is within a sub directory, it will redirect to the root of the site/filename.

            http://www.mysite.com/test/foo.html

            gets redirected to:

            http://www.mysite.com/foo.html

            I want to send the surfer to the same path and file name that they called... just with https.

            Sigh
            http://www.xRag.com

            Comment

            • pussyluver
              Clueless OleMan
              • Mar 2003
              • 11009

              #7
              bump for 2nd shift

              Comment

              Working...