Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何仅在购买过程中使用https?_Apache_.htaccess - Fatal编程技术网

Apache 如何仅在购买过程中使用https?

Apache 如何仅在购买过程中使用https?,apache,.htaccess,Apache,.htaccess,我只想将https放在支付页面上,但似乎发生了一些冲突,这些规则无法协同工作: RewriteCond %{HTTPS} ^off$ RewriteCond %{REQUEST_URI} ^/checkout/ RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L] RewriteCond %{HTTPS} ^on$ RewriteCond %{REQUEST_URI} !^/checkout/ RewriteRule (.*) http://%{HTTP

我只想将https放在支付页面上,但似乎发生了一些冲突,这些规则无法协同工作:

RewriteCond %{HTTPS} ^off$
RewriteCond %{REQUEST_URI} ^/checkout/
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]

RewriteCond %{HTTPS} ^on$
RewriteCond %{REQUEST_URI} !^/checkout/
RewriteRule (.*) http://%{HTTP_HOST}/$1 [R,L]
.htaccess 重新启动发动机

    RewriteCond %{HTTPS} ^off$
    RewriteCond %{REQUEST_URI} ^/checkout/
    RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]

    RewriteCond %{HTTPS} ^on$
    RewriteCond %{REQUEST_URI} !^/checkout/
    RewriteRule (.*) http://%{HTTP_HOST}/$1 [R,L]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !server-status
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
RewriteCond%{HTTPS}^off$
重写条件%{REQUEST_URI}^/签出/
重写规则(.*)https://%{HTTP_HOST}/$1[R,L]
在上重写cond%{HTTPS}^$
重写cond%{REQUEST_URI}^/结帐/
重写规则(*)http://%{http_HOST}/$1[R,L]
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}!服务器状态
重写规则^(.*)$index.php?url=$1[QSA,L]

Apache 2.4版

澄清
规则不能一起工作
。你犯了什么错误?