Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 如何从重定向http到https中排除我的子域_.htaccess_Redirect - Fatal编程技术网

.htaccess 如何从重定向http到https中排除我的子域

.htaccess 如何从重定向http到https中排除我的子域,.htaccess,redirect,.htaccess,Redirect,经过一些twerking之后,我成功地将我的站点从http重定向到https,以及其他重定向。很高兴它能工作,但只有一个问题!我的子域页面重定向到域主页。我尝试过各种排除方法,但我无法破解。谢谢你的帮助! (也希望以https运行博客。) RewriteEngine on Options +FollowSymLinks RewriteCond %{THE_REQUEST} ^.*/index\.html RewriteRule ^(.*)index.html$ https://www.westh

经过一些twerking之后,我成功地将我的站点从http重定向到https,以及其他重定向。很高兴它能工作,但只有一个问题!我的子域页面重定向到域主页。我尝试过各种排除方法,但我无法破解。谢谢你的帮助! (也希望以https运行博客。)

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index\.html
RewriteRule ^(.*)index.html$ https://www.westhavenretreat.com/$1 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^.*$ https://%1/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.westhavenretreat.com/$1 [L,R=301] 
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(.*)\.(.*)\. [NC]