这是我的 htaccess 代码:
RewriteOptions inherit
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]
AddDefaultCharset utf-8
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index_dl.cgi?op=download1&id=$1&fname=$2 [L]
RewriteRule ^ot:(.*) /cgi-bin/index_dl.cgi?op=download1&otid=$1 [L,B]
目前它正在将所有内容重定向到 SSL。但是我想要它,以便当文件名满足此条件时
RewriteRule ^([0-9A-Za-z]{12})(\/.+|\.html?|$) /cgi-bin/index_dl.cgi?op=download1&id=$1&fname=$2 [L]
它只需要允许非 SSL
我用谷歌搜索和搜索,但我无法弄清楚如何做到这一点。
任何帮助表示赞赏:)