Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Redirect http page to https

    Hi all,

    Just a quick one - would anyone know the correct htaccess code to redirect a register.php page from http to https? When the site isn't on the register.php page it should redirect back to http.

    Many thanks.

  • #2
    Regular Coder
    Join Date
    Jun 2010
    Posts
    132
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Arrow

    to force HTTPS for a particular folder you can use:
    Code:
    RewriteEngine On 
    RewriteCond %{SERVER_PORT} 80 
    RewriteCond %{REQUEST_URI} somefolder 
    RewriteRule ^(.*)$ https://www.domain.com/folder/$1 [R,L]
    The .htaccess file should be placed in the folder where you need to force HTTPS.
    You can see examples at:
    http://www.besthostratings.com/artic...-htaccess.html
    http://www.askapache.com/htaccess/ss...-htaccess.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •