问:xp.xinpingdq.com
答:您好,设置404,建议在子站目录下建立一个web.config文件,并参考:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/errorpage/404.html" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
将/errorpage/404.html改成404错误文件相对路径,然后报错内容到web.config文件,然后再访问核实
如果需要404返回错误状态码,建议将404报错页面写成动态页,并在文件中定义返回状态值为404即可,请核实
,非常感谢您长期对我司的支持!
问:
请帮忙处理一下,检测状态错误页面是返回的不是404而是301
答:您好,
核实您404设置没有问题,您网站启用了https,因此http请求会自动301重定向到https,那么测试404的时候应该检测https而不是http,我司通过curl测试并无问题,站长工具无法检测https的域名,请继续保持现状。
,非常感谢您长期对我司的支持!