locked
URL rewriting or URL Routing? RRS feed

  • Question

  • User974546961 posted

    Hi,

         Is URL Routing is replacement for URL rewriting.? Or each of them have their own pros on cons? if so..Can any one tell them out.?

    Wednesday, May 26, 2010 4:27 AM

Answers

  • User-1200560727 posted

    Hi,

    Check below post:

    http://forums.asp.net/p/1545556/3783252.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 26, 2010 5:44 AM
  • User-1802908944 posted

    this is complete url for URL rewriting imlementation and what is the use of url rewriting .


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


    please have a look

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 26, 2010 6:24 AM
  • User-1200560727 posted
    •  URL rewriting is used to manipulate URL paths before the request is handled by the Web server. The URL-rewriting module does not know anything about what handler will eventually process the rewritten URL. In addition, the actual request handler might not know that the URL has been rewritten.
    • ASP.NET routing is used to dispatch a request to a handler based on the requested URL path. As opposed to URL rewriting, the routing component knows about handlers and selects the handler that should generate a response for the requested URL. You can think of ASP.NET routing as an advanced handler-mapping mechanism.
    • The IIS URL-rewrite module can be used with any type of Web application, which includes ASP.NET, PHP, ASP, and static files. ASP.NET routing can be used only with .NET Framework-based Web applications.
    • The IIS URL-rewrite module works the same way regardless of whether integrated or classic IIS pipeline mode is used for the application pool. For ASP.NET routing, it is preferable to use integrated pipeline mode. ASP.NET routing can work in classic mode, but in that case the application URLs must include file extensions or the application must be configured to use "*" handler mapping in IIS.
    • The URL-rewrite module can make rewriting decisions based on domain names, HTTP headers, and server variables. By default, ASP.NET routing works only with URL paths and with the HTTP-Method header.
    • In addition to rewriting, the URL-rewrite module can perform HTTP redirection, issue custom status codes, and abort requests. ASP.NET routing does not perform those tasks.
    • The URL-rewrite module is not extensible in its current version. ASP.NET routing is fully extensible and customizable.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 26, 2010 6:45 AM

All replies

  • User-1200560727 posted

    Hi,

    Check below post:

    http://forums.asp.net/p/1545556/3783252.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 26, 2010 5:44 AM
  • User974546961 posted

    Hi Tapan Bhatt

        Thanks for your reply.I have already gone through the link. But it didn't answer my question completely. Can I have more details like in which secanario's I should use rewriting and in which scenario's I should use Routing

    Wednesday, May 26, 2010 6:05 AM
  • User-957313 posted

    check this link... http://msdn.microsoft.com/en-us/library/cc668201.aspx

    Wednesday, May 26, 2010 6:05 AM
  • User974546961 posted

    Hi Chinna

                     Thanks for your reply.Even I have studied this link too. This one also  didn't answer my question completely. 

    Wednesday, May 26, 2010 6:19 AM
  • User-1802908944 posted

    this is complete url for URL rewriting imlementation and what is the use of url rewriting .


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


    please have a look

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 26, 2010 6:24 AM
  • User-1200560727 posted
    •  URL rewriting is used to manipulate URL paths before the request is handled by the Web server. The URL-rewriting module does not know anything about what handler will eventually process the rewritten URL. In addition, the actual request handler might not know that the URL has been rewritten.
    • ASP.NET routing is used to dispatch a request to a handler based on the requested URL path. As opposed to URL rewriting, the routing component knows about handlers and selects the handler that should generate a response for the requested URL. You can think of ASP.NET routing as an advanced handler-mapping mechanism.
    • The IIS URL-rewrite module can be used with any type of Web application, which includes ASP.NET, PHP, ASP, and static files. ASP.NET routing can be used only with .NET Framework-based Web applications.
    • The IIS URL-rewrite module works the same way regardless of whether integrated or classic IIS pipeline mode is used for the application pool. For ASP.NET routing, it is preferable to use integrated pipeline mode. ASP.NET routing can work in classic mode, but in that case the application URLs must include file extensions or the application must be configured to use "*" handler mapping in IIS.
    • The URL-rewrite module can make rewriting decisions based on domain names, HTTP headers, and server variables. By default, ASP.NET routing works only with URL paths and with the HTTP-Method header.
    • In addition to rewriting, the URL-rewrite module can perform HTTP redirection, issue custom status codes, and abort requests. ASP.NET routing does not perform those tasks.
    • The URL-rewrite module is not extensible in its current version. ASP.NET routing is fully extensible and customizable.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 26, 2010 6:45 AM
  • User-1012746545 posted

    In simple work URL Rewriting changes the name of Existing Page with Forms Parameter .

    Like if my.aspx?Id=1000 is exist so I can call this Page Like This  Product/1000.aspx

    and in URL Routing 

    The Simple page can be URL can be replaced by User Friendly Name.

    my.aspx Changes to My



    Wednesday, May 26, 2010 9:08 AM