找了几天,才发现是web.config 这个文件的问题,现在又出现一个问题,就是我把web.config文件的sitemap.php改成sitemap.txt,sitemap.txt文件现在可以打开了,都是其他的又打不开了
,下面附带一下web.config配置代码,各位帮忙看一下,谢谢了
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules><rule name="re1" stopProcessing="true"><match url="^sitemap.txt" ignoreCase="false" /><action type="Rewrite" url="sitemap.txt" /></rule> <rule name="re2" stopProcessing="true"><match url="^favicon.ico" ignoreCase="false" /><action type="Rewrite" url="favicon.ico" /></rule><rule name="re3" stopProcessing="true"><match url="^wp-(.*)" ignoreCase="false" /><action type="Rewrite" url="wp-{R:1}" /></rule><rule name="re4" stopProcessing="true"><match url="^$" ignoreCase="false" /><action type="Rewrite" url="index.php" /></rule><rule name="re5" stopProcessing="true"><match url="^(.*)" ignoreCase="false" /><action type="Rewrite" url="index.php/{R:1}" /></rule>
<rule name="WordPress: https://域名就不上了" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
<rule name="301Redirect" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^域名就不上了\.com$" />
</conditions>
<action type="Redirect" url="https://域名就不上了/{R:0}" redirectType="Permanent" />
</rule></rules>
</rewrite>
</system.webServer>
</configuration>