iis/.net rewrites like php/apache?

Last post 12-30-2007 11:42 PM by M A A Mehedi Hasan. 5 replies.

Sort Posts:

  • iis/.net rewrites like php/apache?

    12-26-2007, 11:10 AM
    • Loading...
    • mod84
    • Joined on 04-02-2007, 7:30 PM
    • Posts 275

    ive noticed alot of sites use rewrite rules in apache for seo purposes. for example, in vbulletin there is a mod that rewrites all requests to a url like blah.com/forum/post.php?id=2394234 TO blah.com/bicycle-shopping-etc.php

     therefore, you have all the seo benefits of a good address, without 1000's of files. how can you do something like this in iis?
     

    EXPERT .NET DEVELOPER
  • Re: iis/.net rewrites like php/apache?

    12-26-2007, 12:23 PM
    Answer

     

    You can use an HttpModule to rewrite the url

     

    http://www.15seconds.com/issue/030522.htm
  • Re: iis/.net rewrites like php/apache?

    12-26-2007, 1:18 PM
    Answer
    • Loading...
    • dpalepu54321
    • Joined on 12-15-2007, 4:51 PM
    • Hyderabad
    • Posts 72

    Hi mod84,

    you can achieve the same in .NET using url rewtitting.

    look at ScottGu's blog

    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

    Mark as answer if this post helps you, So that it will be helpful to others.

    Mark as answer if this post helps you, So that it will be helpful to others.
    ----------------------------------------------
    Cheers,
    dp
  • Re: iis/.net rewrites like php/apache?

    12-26-2007, 11:23 PM
    Answer
    • Loading...
    • mvark
    • Joined on 09-15-2005, 1:33 PM
    • Posts 436


    You can also consider using URL Replacer, a free ISAPI filter (with source code) that you can download from here - http://www.motobit.com/help/url-replacer-rewriter/iis-mod-rewrite.asp

  • Re: iis/.net rewrites like php/apache?

    12-30-2007, 1:48 PM
    • Loading...
    • gearbox
    • Joined on 07-11-2007, 7:37 PM
    • Posts 8

    The URL rewriting you want to do (get the id parameter and rewrite the URL using a textual description like "bicyle-shopping-etc") requires database lookup. You need to install IIS Mod-Rewrite (fully compatible with Apache mod_rewrite) and use the RewriteMap txt: or dbm: function for static map lookup, or prg: function for external database access.

  • Re: iis/.net rewrites like php/apache?

    12-30-2007, 11:42 PM

    Hi,

    These might be helpful,

     

    http://msdn2.microsoft.com/en-us/library/ms972974.aspx

    http://www.codeproject.com/KB/aspnet/URLMapping.aspx

    http://www.codeproject.com/KB/aspnet/urlrewriter.aspx
    http://www.codeproject.com/KB/aspnet/Chameleon.aspx
    http://www.codeproject.com/KB/aspnet/Url_ReWritting_made_Easy.aspx

    http://www.isapirewrite.com/
    http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/

     

    Mehedi Hasan


    Mark as answer if the post meets your requirement!
Page 1 of 1 (6 items)
Microsoft Communities
Page view counter