简体   繁体   English

使用数据库变量重写IIS 7 URL

[英]IIS 7 url rewrite using database variables

I would like to change my urls from http://www.example.com/product.asp?productid=30 to: http://www.example.com/Samsung_LED_UE40D5000 我想将网址从http://www.example.com/product.asp?productid=30更改为: 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. Samsung_LED_UE40D5000是产品名称+存储在数据库中的产品型号,并与productid关联作为主键。

how do i write a url rewrite rule to achieve that? 我该如何编写url重写规则来实现这一目标? Thanks a lot! 非常感谢!

OB OB

You have to write Custom Rewrite Provider which accesses database to resolve product name + the product model to productId. 您必须编写定制重写提供程序 ,该程序访问数据库以将产品名称+产品模型解析为productId。 Then use this Provider in your rewrite rules. 然后在重写规则中使用此提供程序。

Here is document describing the process. 是描述过程的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM