apache设置自动将http跳转到https的方法
复制代码 代码如下:
<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
# httpd.apache.org/docs/2.2/mod/core#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 ^.*$ %{SERVER_NAME}%{REQUEST_URI} [L,R]
新加坡服务器的速度怎么样
深圳机房IDC数据中心如何办理托
超融合最少需要几台服务器
泰国服务器供应商哪家的比较好?
海外服务器哪个好?怎么选
什么是Isp路由服务器?有什么用
泰国服务器租赁和托管分别有哪些
租用新加坡服务器时应该注意什么
超融合一体机和服务器的区别
泰国服务器租用怎么选租用到好的