网站不断请求 301 URL 地址
Website keeps requesting a 301 URL address
我的网站给了我一个 "This website is not secure" 但我找不到它的根,尽管我仔细检查了所有内容以查看是否有任何 http 并将它们切换为 https。我也有 cloudflare 强制 https。
我检查了网络选项卡,发现一个 URL 给我带来麻烦,但它没有给我太多信息
URL 永久移动了 301。我不知道我在 html 的哪个位置请求此网站。我什至用ctrl + f 什么也没有出现。
它只是在请求 http://mywebsite.com/,但是在我的 html 请求我的网站的 http 版本时我看不到任何内容。我也没有任何会导致我的网站在 .htaccess 中请求 http 的东西。
RewriteEngine On
Options -Indexes
RewriteRule ^folder/?$ - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /index.html [L]
ErrorDocument 403 /index.html
ErrorDocument 404 /index.html
ErrorDocument 500 /index.html
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/403/$
RewriteRule ^(.*)$ /index.html [L]
RewriteCond %{REQUEST_URI} ^/404/$
RewriteRule ^(.*)$ /index.html [L]
RewriteCond %{REQUEST_URI} ^/500/$
RewriteRule ^(.*)$ /index.html [L]
有什么我遗漏的吗?
我发现了问题。看起来是 jQuery 在请求我网站的 http 版本。
我不能 ctrl + f 它,因为它是 cloudflare jQuery link。
https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
在第 2727 行,它正在使用 http 检查。 (图上是https是因为我刚改的)
修复
- 将 jQuery 保存到本地并将 http 更改为 https。
我的网站给了我一个 "This website is not secure" 但我找不到它的根,尽管我仔细检查了所有内容以查看是否有任何 http 并将它们切换为 https。我也有 cloudflare 强制 https。
我检查了网络选项卡,发现一个 URL 给我带来麻烦,但它没有给我太多信息
URL 永久移动了 301。我不知道我在 html 的哪个位置请求此网站。我什至用ctrl + f 什么也没有出现。
它只是在请求 http://mywebsite.com/,但是在我的 html 请求我的网站的 http 版本时我看不到任何内容。我也没有任何会导致我的网站在 .htaccess 中请求 http 的东西。
RewriteEngine On
Options -Indexes
RewriteRule ^folder/?$ - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /index.html [L]
ErrorDocument 403 /index.html
ErrorDocument 404 /index.html
ErrorDocument 500 /index.html
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/403/$
RewriteRule ^(.*)$ /index.html [L]
RewriteCond %{REQUEST_URI} ^/404/$
RewriteRule ^(.*)$ /index.html [L]
RewriteCond %{REQUEST_URI} ^/500/$
RewriteRule ^(.*)$ /index.html [L]
有什么我遗漏的吗?
我发现了问题。看起来是 jQuery 在请求我网站的 http 版本。
我不能 ctrl + f 它,因为它是 cloudflare jQuery link。
https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
在第 2727 行,它正在使用 http 检查。 (图上是https是因为我刚改的)
修复
- 将 jQuery 保存到本地并将 http 更改为 https。