简体   繁体   中英

IIS Rewrite Not Working

I'm trying to get URL rewriting working but having problems. I have several rules set up with BlogEngine.NET and I want to redirect several pages to a "Coming Soon" page. Despite being able to access a valid page at mydomain.com/page/coming-soon.aspx by typing it directly, if I try to access it via mydomain.com/category.aspx, the rule below does not work - I just get a 404 that '/page/coming-soon.aspx' does not exist.

  <rule name="Coming Soon4" stopProcessing="true">
      <match url="^category.aspx/?$" />
      <action type="Rewrite" url="page/Coming-Soon.aspx" />
  </rule>

您不是要type="Redirect"而不是Rewrite吗?

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