问题
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