Having Problem with Url-Rewrite on a new website

Discussion in 'C#' started by Caliseo, Dec 7, 2009.

  1. #1
    how can i do URL rewriting in asp.net. i am doing through

    <urlrewrites>
    <rule>
    <url>/Details_(.*)_([0-9]*)\.aspx</url>
    <rewrite>/ProductPage.aspx</rewrite>
    </rule>
    </urlrewrites>

    but its not working. plz any one can help
     
    Caliseo, Dec 7, 2009 IP
  2. pddinh

    pddinh Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    In .net, you can use UrlRewritingNet to rewrite url. it's so easy.

    :)
     
    pddinh, Dec 8, 2009 IP
  3. pom4ik

    pom4ik Greenhorn

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    16
    #3
    this is what I used:

    <urlMappings enabled="true">
    <add mappedUrl="~/home.aspx" url="~/index.aspx?pid=01" />
    <add mappedUrl="~/faq.aspx" url="~/index.aspx?pid=02" />
    <add mappedUrl="~/contact.aspx" url="~/index.aspx?pid=03" />
    <add mappedUrl="~/test.aspx" url="~/index.aspx?pid=04" />
    </urlMappings>

    this shows the url on the right and people can still save it in the favorites.... :)
     
    pom4ik, Dec 15, 2009 IP
  4. SIPHILP

    SIPHILP Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Another option would be to use IIS 7 url rewrite module:

    learn.iis.net/page.aspx/460/using-url-rewrite-module/

    or you could use ASP.NET MVC

    asp.net/mvc/
     
    Last edited: Dec 17, 2009
    SIPHILP, Dec 17, 2009 IP