开发者社区> 问答> 正文

求助 web.config 的301 怎么写啊?

我在网上找了段代码 加上以后就会出现500错误,请问这是什么原因啊?
怎么解决啊? 大家帮帮忙。。。

我用系统里面的 HTTP 重定向 的话 就会 一直重复刷新 不知道什么原因

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
<rewrite>
      <rules>
        <rule name="Redirect Domain" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTP_HOST}" pattern="^hao51la.com$" negate="true"/>
          </conditions>
          <action type="Redirect" url="http://www.hao51la.com/{R:0}" redirectType="Permanent"/>
        </rule>
      </rules>
    </rewrite>
        <httpErrors>
            <remove statusCode="404" subStatusCode="-1" />
            <error statusCode="404" prefixLanguageFilePath="" path="/HttpErrors/404.htm" responseMode="ExecuteURL" />
        </httpErrors>
        <defaultDocument>
            <files>
                <clear />
                <add value="index.php" />
                <add value="Default.htm" />
                <add value="Default.asp" />
                <add value="index.htm" />
                <add value="index.html" />
                <add value="iisstart.htm" />
                <add value="default.aspx" />
            </files>
        </defaultDocument>
        <httpRedirect enabled="false" destination="http://www.hao51la.com/" exactDestination="false" childOnly="false" httpResponseStatus="Permanent" />
    </system.webServer>
</configuration>

展开
收起
lusongri 2011-08-19 12:10:21 7515 0
1 条回答
写回答
取消 提交回答
  • 这个 我不会`
    等高手``
    2011-08-20 11:56:42
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
WEB SERVICE EFFICENCY 立即下载
从Web到Cloud App 立即下载
基于webpack和npm的前端组件化实践 立即下载