Actions
Actions operate based on the evaluation of the rewriting rules and the conditions. Many of the most common commands are provided out-of-the-box, and UrlRewriter.NET provides the capability to define your own custom actions.
- rewrite
- rewrites the Location.
- redirect
- redirects to a new Location.
- if
- provides a conditional, grouping construct.
- unless
(from 2.0b3) - provides a negative conditional.
- add header
- adds headers.
- set cookie
- sets a cookie.
- set property
- sets a property.
- set status
- sets the HTTP response status code.
- forbidden
- returns a 403 Forbidden status.
- not-found
- returns a 404 Not Found status.
- not-allowed
- returns a 405 Method Not Allowed status.
- gone
- returns a 410 Gone status.
- not-implemented
- returns a 501 Not Implemented status.
- How to write your own actions
- describes how to extend UrlRewriter.NET with your own actions.