If you’re running on Apache (most likely) and you don’t mind your whole site running over https (which these days you should do anyway if you’ve already got SSL set up on the server) you can drop this in your .htaccess file. If a .htaccess file does not exist in your public directory, you can create it.
# Make sure the following line is in your htaccess file before the rewrite
RewriteEngine On
# These two lines force SSL
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
If you’re running on Apache (most likely) and you don’t mind your whole site running over https (which these days you should do anyway if you’ve already got SSL set up on the server) you can drop this in your .htaccess file. If a .htaccess file does not exist in your public directory, you can create it.# Make sure the following line is in your htaccess file before the rewrite RewriteEngine On # These two lines force SSL RewriteCond %{HTTPS} !=on RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Thank you, but how would I restrict it to only the admin?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.