简体   繁体   English

重定向web.config IIS 8

[英]Redirect web.config IIS 8

I tried to make a redirect in web.config, but I get a 500 error. 我试图在web.config中进行重定向,但出现500错误。 The version of IIS is 8.5, but before I was on version 6. What is wrong with this syntax ? IIS的版本是8.5,但在我使用版本6之前。此语法有什么问题?

    <location path="Test/test.aspx">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain/Test/IT/test.aspx" httpResponseStatus="Permanent" />
</system.webServer>
</location>

I get an this error message : Internal error - 500. I deleted the lines in web.config and everything works again. 我收到此错误消息:内部错误-500。我删除了web.config中的行,并且一切正常。

I tried URL Rewrite feature, but I get an error. 我尝试了URL重写功能,但出现错误。

"Cannot read configuration file due to insufficient permissions" “由于权限不足,无法读取配置文件”

I am trying to fix with these instructions below, but the system asked me for user/password. 我正在尝试按照以下说明进行修复,但是系统要求我输入用户名/密码。 I am as administrator, but those credentials didn't work. 我是管理员,但这些凭据无效。

Cannot read configuration file due to insufficient permissions 由于权限不足,无法读取配置文件

The HttpRedirectionModule is installed in the server. HttpRedirectionModule安装在服务器中。 Also, RewriteModule 另外,RewriteModule

Did you install the HttpRedirect module? 您是否安装了HttpRedirect模块? It is optional under IIS7+. 在IIS7 +下是可选的。

If that isn't it would help if you could post the detailed error message you get from hitting this locally if you can -- that will help narrow down the cause. 如果不是这样,则可以发布详细的错误消息(如果可以的话),这将有所帮助-这将有助于缩小原因。

Finally, you might want to look into URL rewriting here, it is a new feature for IIS7+ that can handle simple url redirects like the above and much more. 最后,您可能想在这里研究URL重写,它是IIS7 +的一项新功能,可以处理上述简单的URL重定向等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM