Earlyer today i decided to make the whole site run via HTTPS
this was the code I used.
Add to Functions.php
where you see <?php at the top add just after
Some problems do come up tho so you need to set the site URL in the config to [url="https://www.yoursite.com/"]https://www.yoursite.com/[/url] < I stress the https part.
You can get a SSL certificate from Namecheap.com for $9.99 or if you order Whois Guard you get a free 1 year SSL certificate for $0.99 with the offer code WGspecial or if you transfer or buy a domain you can get a domain for $8.88 with the code SUMMERTIME, with 1 year Whois Guard and a 1 year SSL certificate. (Offers and codes correct as of 9/6/10)
this was the code I used.
Add to Functions.php
function secure_page()
{
if ( !isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) !== 'on' )
{
header ('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
exit();
}
}In header.phpwhere you see <?php at the top add just after
secure_page();Some problems do come up tho so you need to set the site URL in the config to [url="https://www.yoursite.com/"]https://www.yoursite.com/[/url] < I stress the https part.
You can get a SSL certificate from Namecheap.com for $9.99 or if you order Whois Guard you get a free 1 year SSL certificate for $0.99 with the offer code WGspecial or if you transfer or buy a domain you can get a domain for $8.88 with the code SUMMERTIME, with 1 year Whois Guard and a 1 year SSL certificate. (Offers and codes correct as of 9/6/10)