【发布时间】:2017-08-12 20:31:22
【问题描述】:
我的域是https://webkust.be,现在我尝试创建一个子域https://labs.webkust.be
我使用了 Direct Admin 和 SSL(让我们加密)
所以在 /public_html/ 中,在 htaccess 中设置:
## REDIRECT TO HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$
https://www.webkust.be/$1 [R,L]
</IfModule>
在 /private_html/ 中添加网站 这非常适合 webkust.be
但现在我尝试在同一主机上添加一个新的子域 https://labs.webkust.be 这行不通。 有没有办法将子域重定向到 https://?
【问题讨论】:
-
你缺少
>来关闭<IfModule mod_rewrite.c它必须是<IfModule mod_rewrite.c >