国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Apache > 正文

apache設置自動將http跳轉到https的方法

2024-08-27 18:29:36
字體:
來源:轉載
供稿:網友

復制代碼 代碼如下:


<Directory "/opt/fivetrees">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# #options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All #這里原先是None要改為All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

首先,在網站根目錄下創建.htaccess文件,在最下面添加寫入如下語句:

復制代碼 代碼如下:


RewriteEngine on
RewriteBase / #我這行是沒有配置
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 石门县| 鄂州市| 光泽县| 新密市| 马关县| 郓城县| 蒙阴县| 天津市| 新民市| 安国市| 从化市| 中方县| 梁河县| 昌都县| 周至县| 新龙县| 平乐县| 建水县| 鄂州市| 东海县| 喜德县| 镇原县| 余姚市| 漾濞| 岑溪市| 贺兰县| 响水县| 双鸭山市| 湘乡市| 定边县| 荆州市| 蒲江县| 丰顺县| 临海市| 双峰县| 阿拉尔市| 峡江县| 房产| 调兵山市| 藁城市| 扎兰屯市|