.htaccess 整个网站都是https://但现在只需要将主页设为http://-当我转到https://domain.com
浏览了整个网站,但无法真正找到解决我的问题的方法 我的整个网站是https://,http://www.domain, http://domain 将重定向到,然后整个站点将按https://smoothly. 我现在只需要将我的主页设置为http://因为我使用的脚本不会加载到chrome上,因为它使用了一些http://链接,所以我无法更改脚本,所以我唯一的修复方法是将我的主页设置为http://然后其余的,包括所有内部页面,自动成为https:// 以下是我的htaccess的外观:.htaccess 整个网站都是https://但现在只需要将主页设为http://-当我转到https://domain.com,.htaccess,mod-rewrite,redirect,https,.htaccess,Mod Rewrite,Redirect,Https,浏览了整个网站,但无法真正找到解决我的问题的方法 我的整个网站是https://,http://www.domain, http://domain 将重定向到,然后整个站点将按https://smoothly. 我现在只需要将我的主页设置为http://因为我使用的脚本不会加载到chrome上,因为它使用了一些http://链接,所以我无法更改脚本,所以我唯一的修复方法是将我的主页设置为http://然后其余的,包括所有内部页面,自动成为https:// 以下是我的htaccess的外观:
rewriteengine on
#rewritecond %{HTTP_HOST} ^www.domain.com$
#rewriterule ^$ "http\:\/\/domain\.com\/" [R=301,L] #528a28c9588af
RewriteCond %{HTTPS} on
RewriteRule (^$) http://%{SERVER_NAME}%{REQUEST_URI} [R=302,L]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
#RewriteCond %{SERVER_PORT} 443
#RewriteRule ^(|/)$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
rewritecond $0 !^(index\.php|front_assets|images|captcha|css|js|editor|assets|robots\.txt)
rewriterule ^.*$ index.php [L]
This is pretty bad but some of it works, it redirects the http://www homepage to http:// which is what i want, it also redirects https:// www. domain .com to http:// homepage which is what i want, but when i go to https:// domain .com it redirects to http:// homepage but gives a redirect loop version.
Basically what I want is to make http:// www . domain .com, https:// domain .com and https:// www . domain.com to redirect to http:// domain.com
and then once we're on http:// domain .com, if you click on anything or go to any inner pages I want it to show the https version, i just need the homepage to be http: //
有谁能帮上忙吗?好几天来,我一直在尝试这样做,但运气不佳
提前感谢试试这些规则:
RewriteCond %{HTTPS} on
RewriteRule ^$ http://%{HOST_NAME}/ [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule ^.+$ https://%{HOST_NAME}%{REQUEST_URI} [L,R=301,NE]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $0 !^(index\.php|front_assets|images|captcha|css|js|editor|assets|robots\.txt)
RewriteRule ^.*$ index.php [L]