简体   繁体   中英

url rewrite for aspx page

I have a page, called foo.aspx and id like to rewrite the url as bar.something

How to do this? How does url rewrite happens in asp.net

Should i create a generic handler?

or should i get some url rewrite modules and add to app?

这是通过配置IIS完成的,并且需要IIS7,在这里查看配置帮助: http//learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

Remember, you also have the new Routing option with ASP.NET 4.0:

https://stackoverflow.com/questions/90112/iis-url-rewriting-vs-url-routing

You should also check this SO response:

IIS URL Rewriting vs URL Routing

Some basic info on the differences between URL Re-Writing and Routing:

http://learn.iis.net/page.aspx/496/iis-url-rewriting-and-aspnet-routing/

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