手动添加子域的.htaccess SSL证书

手动添加子域的.htaccess SSL证书,.htaccess,ssl,https,ssl-certificate,subdomain,.htaccess,Ssl,Https,Ssl Certificate,Subdomain,我已将.htaccess文件用于我的主域(www.domain.com): 重新启动发动机 重写基/ 重写规则^index\.php$-[L] 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则/index.php[L] 重写cond%{HTTPS}=在…上 重写规则^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301] 但是,对于我的子域www.domain.com/Subdo

我已将.htaccess文件用于我的主域(www.domain.com):


重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
重写cond%{HTTPS}=在…上
重写规则^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]
但是,对于我的子域www.domain.com/Subdomain/,图标以安全挂锁开始,然后转到不安全状态。我正在.htaccess文件中使用此选项:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]

关于我应该在子域文件中放什么有什么想法吗

发现了这一点,有一个图像使用了外部URL

www.domain.com
www.domain.com/subdomain/
之间,您不会首先在不同的域之间切换-这是同一个域,因此证书应该同时适用于相同的域,并且没有问题。在这里,您似乎并不是在谈论
subdomain.domain.com
,它也会在内部被重写到该文件夹中。您是否首先检查了浏览器控制台?这可能是一个“混合内容”的问题。我修复了这个问题,我有一个使用另一个域的图像,一旦我删除了这个,我的网站就安全了。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>