2012-03-12 20 views
0

私はurlRewritter.Netを使ってURLの書き換えを行っています...うまくいきます...私はnavigateurl"~/Index.aspx"というハイパーリンクを持っていますが、リンクをクリックすると "http:/localhostを:2731/CitiZenJourNalism/ViewProfile/ Index.aspx」の代わりに "のhttp:// localhostを:2731/CitiZenJourNalism/Index.aspx"urlRewritter.Netを使った間違ったページリンク

なぜ?私は正しくそれを得た場合に任意の助けてください.....

のweb.configコード

<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="~/ViewProfile/(.+)" to="~/ViewProfile.aspx?uid=$1" /> 
    <rewrite url="~/Reports/(.+)/(.+)" to="~/Reports.aspx?cat=$1&amp;id=$2" /> 


    </rewriter> 

答えて

0

は、あなたの設定で "ViewProfile" の文字列を必要といけません。単純に:

<rewrite url="~/(.+)" to="~/ViewProfile.aspx?uid=$1" /> 

このように動作しますか?

+1

私の問題は、私が書き換えを使うとホームページへのリンクが変わったということです...どうすればこの問題を解決できますか? – user1150440

関連する問題