最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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

 更新時間:2013年02月09日 20:23:51   作者:  
客戶中心啟用了https的ssl證書,現(xiàn)在需要將原先的http直接跳轉(zhuǎn)到https上。這里為大家提供一個我經(jīng)常使用到的方法,即使用偽靜態(tài)功能

復(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]

相關(guān)文章

最新評論

夹江县| 林口县| 南宁市| 沙田区| 杂多县| 石狮市| 常德市| 西充县| 卫辉市| 禄劝| 满洲里市| 蓝山县| 沁水县| 贞丰县| 永胜县| 安塞县| 威信县| 庆云县| 绥江县| 贡觉县| 阳城县| 吴忠市| 外汇| 镇康县| 玉溪市| 福贡县| 雷州市| 永康市| 友谊县| 郎溪县| 新营市| 宾阳县| 临猗县| 思南县| 深泽县| 张北县| 锡林郭勒盟| 清原| 泰安市| 邵阳市| 丽水市|