0
我想重写:问题与ASP.net URL
Test.php
到Default.asp
所以我使用规则:
<rewrite url="~/Test.php" to="~/default.asp" />
但该规则给出了一个404
但是这个规则工作正常:
<rewrite url="~/default.aspx" to="~/default.asp" />
但是这个规则404的:
<rewrite url="~/Test" to="~/default.asp" />
我的web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
</httpModules>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
<rewriter>
<rewrite url="~/Test.php" to="~/default.asp" />
</rewriter>
</configuration>