简体   繁体   中英

ASP.NET + IIS 7 - URL Rewriting

I have an index site. On every index there are sub-categories and different cities. Today my URLs look like this: ~/index.aspx?indexid=1&catid=2&location=4

I want to rewrite this to: ~/party-planning-birthday-parties-new-york Where indexid=1 is an index named Party Planning, catid=2 is a sub-category called "birthday parties" etc.

What would be the best way of going about this? And a small side question: Do you think this is a good rewriting scheme? I think it makes the URLs much more readable and informative.

Thank you! -Elad

It seems there is an official solution on the official IIS developer community page:

http://www.iis.net/download/urlrewrite

Never used it myself - I've only used their older sample code (which worked well enough for my purposes).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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