0

Intelligencia URL 書き換えを使用していますが、それらのページがリダイレクトされず、エラー 404 が表示されません。サーバーに書き換えモジュールをインストールしています。私がやっている間違いを教えてください。私のweb.configファイルは以下です..

<?xml version="1.0"?>

<configuration>
   <configSections>
   <section name="rewriter" requirePermission="false"   type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter"/>
  </configSections>  
<appSettings/>
<connectionStrings>
    <add name="connStr" connectionString="Data Source=INV-DEV-SQL2K5;Initial Catalog=WidenerPortal;Persist Security Info=True;User ID=widener;Password=widener123a" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<httpModules>
  <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>       
    <!-- 
        Set compilation debug="true" to insert debugging 
        symbols into the compiled page. Because this 
        affects performance, set this value to true only 
        during development.
    -->
    <compilation debug="true"/>
    <!--
        The <authentication> section enables configuration 
        of the security authentication mode used by 
        ASP.NET to identify an incoming user. 
    -->
    <authentication mode="Windows"/>
    <!--
        The <customErrors> section enables configuration 
        of what to do if/when an unhandled error occurs 
        during the execution of a request. Specifically, 
        it enables developers to configure html error pages 
        to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
        <error statusCode="403" redirect="NoAccess.htm" />
        <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
</system.web>
  <rewriter>
     <rewrite url="~/Article/(.+)-(.+).aspx" to="~/DynamicPage.aspx?MyTitleId=$2"/>
 </rewriter>  
</configuration>
4

2 に答える 2

0

これを使って。Mode=RemoteOnly 他ホストからのアクセス時にリダイレクト

<customErrors mode="On" defaultRedirect="GenericErrorPage.htm">

またはhttp://urlrewriter.net/index.php/support/reference/error-handler/error-pageにアクセスしてください

于 2014-01-16T03:03:26.880 に答える