RegexRedirectRule Constructor (String, String)

HttpServer.dll

Initializes a new instance of the RegexRedirectRule class.

Namespace:  HttpServer.Rules
Assembly:  HttpServer (in HttpServer.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public RegexRedirectRule(
	string fromUrlExpression,
	string toUrlExpression
)
Visual Basic (Declaration)
Public Sub New ( _
	fromUrlExpression As String, _
	toUrlExpression As String _
)
Visual C++
public:
RegexRedirectRule(
	String^ fromUrlExpression, 
	String^ toUrlExpression
)

Parameters

fromUrlExpression
Type: System..::.String
Expression to match url
toUrlExpression
Type: System..::.String
Expression to generate url

Examples

server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}")); Result of ie. /employee1 will then be /user/employee1

See Also