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