gpt4 book ai didi

http - 从 SSL 中排除子域

转载 作者:可可西里 更新时间:2023-11-01 16:40:50 24 4
gpt4 key购买 nike

我已经在我的网站上安装了 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请帮助我

最佳答案

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,而不是 forbid https(我不是你所说的“从 SSL 中排除子域").

关于http - 从 SSL 中排除子域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40691032/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com