开发者

Can we use ASP.Net Url Rewriting features in classical ASP

开发者 https://www.devze.com 2022-12-08 18:27 出处:网络
I am developing an application in classical ASP that now requires sef urls. I do not have any asp.net experience but I\'ve heard that ASP.NET+IIS6 provide built-in url rewriting functionality. So befo

I am developing an application in classical ASP that now requires sef urls. I do not have any asp.net experience but I've heard that ASP.NET+IIS6 provide built-in url rewriting functionality. So before i have someone purchase a url rewriting component for me, I am wondering if it is possible to use the ASP.NET/IIS6 url rewriting functionality in a ASP classical application?

If this is possible, please post in a sample web.config file for the following urls so that I can test it immediately:

/Country/State/City/Area/Rental-1234/
/Country/State/City/Area/Rental-1234/Photos

become:

/rental-detail.asp?rental_id=1234
/rental-photos.asp?rental_id=1234

Edit ----

The webserver is an IIS6 server running on Windows 2003 Server. If its possible to use IIS7's url rewriting functionality then my next question is how easy is it to upgrade from IIS6 开发者_StackOverflow社区to IIS7. Is a service pack upgrade sufficient for this task?


Yes it is possible, but for IIS6 you need a third-party URL rewriting module like IsapiRewrite.

http://www.isapirewrite.com/


You can't upgrade IIS6 to IIS7. Each version is tied to the version of the operating system. Hence to upgrade to IIS7 you need to upgrade the server to Server 2008.


For URL Rewriting in IIS5, IIS6, or IIS7, you can run IIRF .

  • It works with PHP, ASP, ASPNET, JSP, or whatever you run on IIS.
  • it's free, open source
  • config syntax like mod_rewrite
  • can use regular expressions in the patterns
  • can use a different config for each IIS Application
  • in addition to rewriting URLs, you can rewrite arbitrary request headers.
  • also does transparent (reverse) proxy. (ProxyPass)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号