我想从单个链接禁用https,将其强制为http。
https://tipografiasartore.it/autodiscover/autodiscover.xml
我将此字符串添加到我的.htaccess文件中,但它无法正常工作:
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^autodiscover/autodiscover.xml http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
我的.htaccess到目前为止:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^autodiscover/autodiscover.xml http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
答案 0 :(得分:1)
您可以使用以下规则将https://tipografiasartore.it/autodiscover/autodiscover.xml
重定向到其http
版本
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^autodiscover/autodiscover.xml http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
答案 1 :(得分:0)
我建议你试试这段代码。当然它会起作用。
RewriteEngine On RewriteCond%{HTTPS} on RewriteRule(。*)http://% {HTTP_HOST}%{REQUEST_URI} [R = 301,L]