SEO friend URL in .NET

Discussion in 'C#' started by varun8211, Nov 20, 2006.

  1. #1
    I want to change my URLs
    <websitename>/viewnews.aspx?id=2 to <websitename>/viewnews/2/

    is it possible in .aspx ?

    I found on forums, that it is possible to convert it to <websitename>/viewnews/2.aspx but not to <websitename?/viewnews/2/

    Is it true that u need to add ".aspx" in the URL ??
     
    varun8211, Nov 20, 2006 IP
  2. disgust

    disgust Guest

    Messages:
    2,417
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    0
    #2
    not sure if you can do it without an asp extension, but why's it matter? /viewnews/2/ isn't much different from /viewnews/2.asp

    you can find details on doing that (if you want to) here: http://www.codetoad.com/asp_dynamic_static.asp
     
    disgust, Nov 20, 2006 IP
  3. symmetric

    symmetric Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    We use ISAPI Rewrite (http://www.isapirewrite.com/) for that kind of thing. If you have a dedicated server (or if your hosting provider is flexible), it might work for you.

    We've also done SE-friendly URL rewriting similar to yours directly in ASP.NET, but that's more than I want to get into here.

    If I were you, I'd check out ISAPI Rewrite or some other similar product (you could try running a Google search for something like "rewrite URL IIS").
     
    symmetric, Nov 24, 2006 IP
  4. shaileshk

    shaileshk Well-Known Member

    Messages:
    455
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #4
    are you using asp.net 1.2 or asp.net 2.0

    if you are using asp.net 2.0 then you can create seo friendly url using sitemap in asp.net 2.0
     
    shaileshk, Nov 27, 2006 IP
  5. reteep

    reteep Active Member

    Messages:
    181
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #5
    Just build a routine in your global.asax, it's a pice of cake with .NET because the global.asax is being called everytime before a site is being displayed.
     
    reteep, Nov 27, 2006 IP