简体   繁体   中英

URL Rewrite for one level?

I need a rewrite rule that uses only one parameter.

<rewrite url="~/(.+).aspx to="www.mysite.com/results?search=$1" />

The issue with this is that I now cannot access my default.aspx page, and basically all requests that are one file deep - images, stylesheets, etc.

I'm guessing there are some exception rules that can be written?

Also, can I on-the-fly do character replacing such as replacing spaces with "+", underscores with dashes, etc?

Thanks.

No it's not about a rule, you need to configure iis to process with asp.net all file requests.

here you are step by step.

http://forums.iis.net/t/1015329.aspx

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