我已经在我的网站上安装了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但是我还是不能访问http://stock.vinyl.co.id请帮帮我
发布于 2016-11-19 18:16:11
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://vinyl.co.id/$1 [R,L]会将http://上的任何人(在任何域上)重定向到https://vinyl.co.id/。添加另一个RewriteCond以仅将其应用于vinyl.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 (我不知道你说的"Excluding a subdomain from SSL“是什么意思)。
https://stackoverflow.com/questions/40691032
复制相似问题