网络营销电子商务研究中心  
USA Web Hosting Direct
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > 服务器环境搭建
User Name
Password
 
FAQ Members List Calendar 域名注册 PHP Mark Forums Read

服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。

Reply
 
Thread Tools Display Modes
  #1   IP: 199.115.98.60
Old 2017-09-18, 09:58 PM
Union Grove Union Grove is offline
初级会员
 
Join Date: 2011-02-02
Posts: 1
Union Grove 现在声名狼藉
Default How to force SSL with .htaccess

You can force an HTTPS connection on your website by adding these rules in your website's .htaccess file:

Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
The .htaccess file needs to be located inside the site's document root folder. If your website is in a sub folder, then the .htaccess should be placed in the corresponding sub folder.
You can create or edit the .htaccess file either via FTP, or using with the File Manager available in cPanel.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Force display of other currency than default? Kennett Square ZenCart 4 2016-08-13 09:27 PM
.htaccess 域名绑定子文件夹(子目录),一个空间放多 O'Kean Linux 0 2016-03-19 10:26 PM
How To Force Https On Your X-Cart Admin And X-Cart Provider Sections Tenakee Springs X-Cart 0 2015-03-31 01:58 AM
How To Secure X-Cart Tenakee Springs X-Cart 0 2015-03-31 01:52 AM
.htaccess 301 Redirect Packard 建站交流 1 2014-06-15 08:53 PM

Prescription-glasses.com offers prescription glasses online at discount prices.
所有时间均为 +8. 现在的时间是 09:44 PM, Free Patent & Patent Ideas