Mur*_*ala 20 asp.net iis-7 url-rewriting
当我运行.aspx页面时,我收到以下错误.
错误代码0x8007000d无法读取配置节'重写',因为它缺少节声明
我有一个简单的v.aspx页面,其中包含以下代码:
的Response.Write(请求( "Q"))
我的托管服务器作为IIS 7安装了启用URL重写功能(这是他们声称的)
我的web.config文件在以下行中有以下行:
注意:节点下面有蓝色波浪线
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="v.aspx?q={R:1}" />
</rule>
</rules>
</rewrite>
Run Code Online (Sandbox Code Playgroud)
我搜索了stackoverflow但没有找到解决方案.
可能是有人找到了解决方案.
TIA
Pha*_*rus 30
确保您<rewrite>的信息包含在该<system.webServer></system.webServer>部分中.
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="v.aspx?q={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
TDa*_*obz 18
安装URL重写模块http://www.iis.net/download/URLRewrite,应该排序.它解决了我的问题
| 归档时间: |
|
| 查看次数: |
25310 次 |
| 最近记录: |