Http 从SSL中排除子域

Http 从SSL中排除子域,http,redirect,ssl,https,subdomain,Http,Redirect,Ssl,Https,Subdomain,我已经在我的网站上安装了SSL,但我希望我的SSL证书只在我的主域(而不是子域)上工作。 我在主域名上安装了Wordpress,在子域名上安装了YetiForce 我在.htaccess文件中使用以下代码 RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://vinyl.co.id/$1 [R,L] # BEGIN WordPress <IfModule mod_rewrite.c> R

我已经在我的网站上安装了SSL,但我希望我的SSL证书只在我的主域(而不是子域)上工作。 我在主域名上安装了Wordpress,在子域名上安装了YetiForce

我在.htaccess文件中使用以下代码

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://vinyl.co.id/$1 [R,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} stock.vinyl.co.id
RewriteCond %{REQUEST_URI} !stock/
RewriteRule ^(.*)$ stock/$1 [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
重新编写引擎打开
重写cond%{SERVER_PORT}80
重写规则^(.*)$https://vinyl.co.id/$1[R,L]
#开始WordPress
重新启动发动机
重写基/
重写cond%{HTTP_HOST}stock.venyly.co.id
重写cond%{REQUEST_URI}!股票/
重写规则^(.*)$stock/$1[L]
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress
但我还是无法访问 请帮帮我

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://vinyl.co.id/$1 [R,L]
http://
(任何域上)上的任何人重定向到
https://vinyl.co.id/
。添加另一个
RewriteCond
以仅将其应用于
venyly.co.id

RewriteCond %{HTTP_HOST} vinyl.co.id
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://vinyl.co.id/$1 [R,L]

请注意,这将允许您在http上访问
stock.vinyl.co.id
,而不是禁止https(我不知道您所说的“从SSL中排除子域”)。

hello@david,我在RewriteCond%{http_HOST}venyly.co.id RewriteCond%{SERVER_PORT}80 RewriteRule^(.*)$ https://vinyl.co.id/$1[R,L]#在RewriteBase/RewriteCond%{HTTP_HOST}stock.乙烯基.co.id RewriteCond%{REQUEST_URI}上启动WordPress RewriteEngine!stock/RewriteRule^(.*)$stock/$1[L]RewriteRule^index\.php$-[L]RewriteCond%{REQUEST_FILENAME}-f RewriteCond%{REQUEST_FILENAME}-重写规则/index.php[L]#END WordPress我仍然找不到服务器。您能否为重写模块(对于apache 2.2,对于apache 2.4)启用调试日志并用它们编辑您的问题?