Forum Moderators: rogerd & travelin cat
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) [%{HTTP_HOST}%{REQUEST_URI}<...]
The above code basically says "IF HTTPS is OFF then redirect to ["...]
CONTROL PANEL SETTING FOR SINGLE HTTP/HTTPS FOLDER
If you're using a control panel like Plesk you'll find a checkbox that will configure one folder to server docs for both http and https.
SYMLINK HTTPS FOLDER TO HTTP
If you can't click a checkbox to resolve this issue, you can do the following:
If you have shell access, and the control panel doesn't support serving it all from one folder, do something like this, which would also work on a Plesk server, adjust accordingly:
1. Delete your httpsdocs folder which may be something like:
"rmdir /home/vhosts/domain/httpsdocs"
You'll probably have to empty it first, which can be done with one command but I'll let you clean it out the hard way to make sure you don't kill anything you need.
OR, more simple and easy to recover in case all hell breaks loose is to just rename it and restore it in case you can't make this work.
"mv /home/vhosts/domain/httpsdocs /home/vhosts/domain/httpsdocs.old"
2. Create a symbolic link like this, adjust to match your paths.
"ln -s /home/vhosts/domain/httpdocs httpsdocs"
This basically says the httpsdocs folder is now located in your httpdocs folder, think of it like a 301 redirect ;)
3. Chown httpsdocs:
"chown username:psaserv httpsdocs"
Hopefully one of these two methods works for you.
WORST CASE, MOVE FILES TO HTTPS FOLDER
Otherwise, just move all your files into the HTTPS folder and the .htaccess redirect will take care of the rest.
GOOGLE FUD STARTS THE SSL MIGRATION
I'm curious why you want the entire site in HTTPS? Normally this would be used for eCommerce and access to the dashboard. Why lock up the public side?
Google's making HTTPS a ranking factor and they claim it's to help people surf securely, but my guess is it's the "final solution" for spammers.
If they really do start ranking everyone with HTTPS above the slew of garbage, all the scraper and MFA sites, that just by definition of ranking secure sites above everything else the spam will effectively cease to exist.
I'm planning to add a wildcard cert to all my servers and hope they don't require a unique cert per domain to rank. ;)
I think we're seeing the end of spammy sites as soon as HTTPS reaches the tipping point, gone in the top 10 at least, thanks to everyone running around in a wild panic just because Google dropped a little FUD about SSL ranking.
I just hope the pile of sites with ranking issues doesn't get too high when the lemmings follow Google off the SSL cliff.