将域和子域重定向到.htaccess中的https
如何使用RewriteEngine将域和所有子域重定向到https和将域和子域重定向到.htaccess中的https,.htaccess,mod-rewrite,https,.htaccess,Mod Rewrite,Https,如何使用RewriteEngine将域和所有子域重定向到https和www.domain.tld到https://domain.tld是否使用相对路径 目前我正在使用类似的东西 DirectoryIndex index.php AddDefaultCharset UTF-8 Options +FollowSymlinks -MultiViews RewriteEngine On RewriteCond %{SERVER_PORT} =80 RewriteCond %{HTTP_HOST} !^
www.domain.tld
到https://domain.tld
是否使用相对路径
目前我正在使用类似的东西
DirectoryIndex index.php
AddDefaultCharset UTF-8
Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteCond %{SERVER_PORT} =80
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
它可以将所有内容重定向到https
而无需www
,我可以看到一些子域也在重定向,但是邮件.domain.tld
在http
上仍然可用,无论我在做什么
请注意,我正在该子域上运行,并且没有访问此目录的权限,因此我无法将另一个.htaccess放入mail.domain.tld
目录
mail.domain.tld
由mail.domain.tld
站点根目录中的.htaccess
控制。您可以在Apache服务器配置中使用重定向规则对其进行重定向,但不能在任何其他配置中使用。htaccess@anubhava我现在明白了,但我没有访问邮件目录的权限,它实际上不是托管管理面板中我的子域的一部分。。。那么,有没有其他方法来重定向邮件?就像强制roundcube只能通过https访问一样?好的,我会简单地要求我的主机提供商强制roundcube上使用https:)是的,这将是最好的方法。