网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   X-Cart (https://www.0058.net/forumdisplay.php?f=70)
-   -   How To Force Https On Your X-Cart Admin And X-Cart Provider Sections (https://www.0058.net/showthread.php?t=5061)

Tenakee Springs 2015-03-31 12:58 AM

How To Force Https On Your X-Cart Admin And X-Cart Provider Sections
 
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



All times are GMT +8. The time now is 10:45 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.