HTTP和HTTPS的运行取决于浏览器中的用户类型。 示例我有一个名为http:// example的网站。 com和它正在工作和生活,然后我想让它的工作像https://例如。 COM。为我的网站使用HTTP和HTTPS
如果用户键入
http: //example .c om
它会工作,同样
https: //example .c om
我有这样
Options FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.html
htaccess文件我已经使用这个
RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$
RewriteRule ^(.*)$ - [env=askapache:%2]
试图
这
RewriteCond %{SERVER_PORT} 443
RewriteRule ^(.*)$ https: // example. com/$1 [P,L]
RewriteRule ^(.*)$ http:// example . com/$1 [P,L]
这
RewriteCond %{HTTPS} =on
RewriteRule ^(.*)$ - [env=ps:https]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ - [env=ps:http]
仍然没有工作。我只能访问http,但我不能。 example.c o m只是一个简单的网页,不包含任何安全风险。 有我的链接,因为我不能发布超过1个链接空格
安装在想,是的,它重定向,但404没有找到。 是否有可能无论http或HTTPS写入网址,没有重定向,但它会工作相同,显示相同? – MariaLouise