RedirectRule Constructor (String, String, Boolean)

HttpServer.dll

Initializes a new instance of the RedirectRule class.

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

Syntax

C#
public RedirectRule(
	string fromUrl,
	string toUrl,
	bool shouldRedirect
)
Visual Basic (Declaration)
Public Sub New ( _
	fromUrl As String, _
	toUrl As String, _
	shouldRedirect As Boolean _
)
Visual C++
public:
RedirectRule(
	String^ fromUrl, 
	String^ toUrl, 
	bool shouldRedirect
)

Parameters

fromUrl
Type: System..::.String
Absolute path (no servername)
toUrl
Type: System..::.String
Absolute path (no servername)
shouldRedirect
Type: System..::.Boolean
true if request should be redirected, false if the request uri should be replaced.

Examples

server.Add(new RedirectRule("/", "/user/index"));

See Also