TStaticModule.NeedsRedirect Method
Determines whether a request URI that maps to a directory should be redirected to its canonical form according to the specified folder URL mode.
Syntax
Unit: Sparkle.Module.Static
class function TStaticModule.NeedsRedirect(Uri: TUri; FolderUrlMode: TFolderUrlMode; var Location: string): Boolean; static;
Parameters
| <-> | Parameter | Type | Description |
|---|---|---|---|
| Uri | TUri | The request URI to evaluate. | |
| FolderUrlMode | TFolderUrlMode | The trailing-slash policy that governs whether a redirect is required. |
|
| var | Location | string | When the function returns True, receives the absolute URL to redirect to. |
Returns
True if a redirect is required and Location has been set; otherwise False.