0

I have a section of my site where users login and can create and edit profiles. Theses profiles are edited through a channel form and are behind a login. I have moved this section of the site over to https recently and it all works ok but my issue is the member login

{exp:member:login_form return="staff/index"}

This is insecure and give the user a browser prompt stating that before login.Is there a way to secure this login

Thanks

0

There are many ways to force HTTPS. If you have a valid certificate, you really should force your entire site to use the protocol, the only reason not to is if you need to support very very legacy devices (think old dumb phones). In your .htaccess file, before your index.php rewrite, add something like this:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

If you really just want to force it on one page, you can add a condition like this:

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} \/staff\/index [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

This will only force the staff/index base URI to use the HTTPS protocol.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.