RegexRedirectRule Constructor (String, String)
From HttpServer.dll
| C# Webserver |
| RegexRedirectRule Constructor (String, String) |
| RegexRedirectRule Class Example See Also Send Feedback |
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