IIS 7 url rewrite using database variables

大城市里の小女人 提交于 2019-12-13 07:27:58

问题


I would like to change my urls from http://www.example.com/product.asp?productid=30 to: http://www.example.com/Samsung_LED_UE40D5000

the Samsung_LED_UE40D5000 is the product name + the product model stored in the database and is associated with the productid as the primary key.

how do i write a url rewrite rule to achieve that? Thanks a lot!

O.B


回答1:


You have to write Custom Rewrite Provider which accesses database to resolve product name + the product model to productId. Then use this Provider in your rewrite rules.

Here is document describing the process.



来源:https://stackoverflow.com/questions/9740543/iis-7-url-rewrite-using-database-variables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!