Further protect your X-Cart admin and provider sections by forcing the use of HTTPS.
Accessing your X-Cart admin section using https is always a good idea so the data you transact during the X-Cart session is encrypted. The following code will force your X-Cart admins/providers to login using https:// by redirecting them when http:// is used.
Add this code to the .htaccess of your admin section (adjust your url):
Code:
# WCM - Force https on the admin section
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://www.example.com/admin/$1 [R=301,L]
# / WCM - Force https on the admin section
Add this code to the .htaccess of your provider section (adjust your url):
Code:
# WCM - Force https on the admin section
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^(.*)$ https://www.example.com/provider/$1 [R=301,L]
# / WCM - Force https on the admin section