0

i am using urlRewritter.Net for url rewritting...which works fine...i have a hyperlink on the page with navigateurl "~/Index.aspx" but clicking on the link takes me to "http://localhost:2731/CitiZenJourNalism/ ViewProfile/ Index.aspx" instead of "http://localhost:2731/CitiZenJourNalism/Index.aspx"

why?? any help please.....

web.config code

<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>
user1150440
  • 439
  • 2
  • 10
  • 23

1 Answers1

0

If i got it correctly, you dont need "ViewProfile" string in your configuration. Simply:

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

Does it work this way?

Efe Kaptan
  • 465
  • 2
  • 11