...

View Full Version : Redirect http page to https



sibbels
09-21-2010, 11:24 AM
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.

Tony M
09-21-2010, 05:18 PM
to force HTTPS for a particular folder you can use:

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/articles/force-ssl-htaccess.html
http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html
:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum