URL Rewriting on .NET

て烟熏妆下的殇ゞ 提交于 2019-12-13 12:49:37

问题


How can I acheive bi direction rewriting to where the following occurs inbound to the web server

www.mysite.com/region/program/cat1/cat2/cat3

sends the request to the server

www.mysite.com/program.ASPX?idregion=(regionlookupnumber)&idcategory=3276

and when the server is going to write the above it converts it the other way.

Bi-directional URL rewriting on IIS7 using the URL rewriting package. We don't want to modify the source code if possible.

Any advise or resource or sample link please?


回答1:


I did this using the automatic friendly url template of the url rewriting package 2.0 It works really well. You just need to make sure to only re-write the urls you really need to. If you re-write img, link, etc. tags for instance, it can break your page.



来源:https://stackoverflow.com/questions/5448478/url-rewriting-on-net

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