我目前在网络上使用以下脚本:
######################################### #### BEGIN EDIT FOR MOD_REWRITE #### #### This is intended to force HTTPS #### #### for all inbound HTTP requests #### #### # This module (mod_rewrite) simply tells Apache2 that all connections to # port 80 need to go to port 443 . SSL . No exceptions #### LoadModule rewrite_module modules/mod_rewrite.so RewriteEngine on #### # The line below sets the rewrite condition for mod_rewrite.so. # That is, if the server port does not equal 443, then this condition is true #### RewriteCond %{HTTPS} !=on #ReWriteCond %{SERVER_PORT} !^443$ #### # The line below is the rule, it states that if above condition is true, # and the request can be any url, then redirect everything to https:// plus # the original url that was requested. #### RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] #### END EDIT FOR MOD_REWRITE #### #######################################
该脚本被添加到我的 httpd.conf 文件中, 它运行在 LAMP 堆放的 CentOS 服务器上。 它完全可以做我需要它做的, 也就是将所有流量都转到服务器上的任何网站到 https 。
然而,我想对服务器上一个不需要使用 https 的站点做一个例外。 我该怎么配置这个例外?
我为一个基本问题道歉,因为我不是贸易开发商。
提前感谢!