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

首頁 > 網(wǎng)站 > Apache > 正文

apache設(shè)置自動(dòng)將http跳轉(zhuǎn)到https的方法

2024-08-27 18:26:48
字體:
供稿:網(wǎng)友

復(fù)制代碼 代碼如下:

<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
# http://httpd.apache.org/docs/2.2/mod/core.html#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>

首先,在網(wǎng)站根目錄下創(chuàng)建.htaccess文件,在最下面添加寫入如下語句:

復(fù)制代碼 代碼如下:

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

您可能感興趣的文章:

http自動(dòng)跳轉(zhuǎn)https的配置方法http轉(zhuǎn)https的實(shí)戰(zhàn)記錄(iis 7.5)
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 余庆县| 通辽市| 泽州县| 广东省| 铜川市| 延长县| 玉门市| 鹿邑县| 武定县| 永靖县| 鄂伦春自治旗| 嘉黎县| 大丰市| 会理县| 思茅市| 孙吴县| 吴江市| 博罗县| 咸丰县| 阿巴嘎旗| 沙田区| 广水市| 阿巴嘎旗| 大连市| 孝义市| 南宁市| 杨浦区| 榕江县| 右玉县| 沧州市| 沙雅县| 晋宁县| 栾城县| 包头市| 赫章县| 宁蒗| 县级市| 竹溪县| 温宿县| 嘉义县| 紫阳县|