Description | This article describes the steps to use the rewrite rule to redirect URL landing page to subdirectory in L7 HTTP/HTTPS Virtual Server. |
Scope | FortiADC, FortiADC-VM. |
Solution |
Prerequisite:
FortiADC L7 HTTP/HTTPS supports using content rewriting rules to rewrite HTTP requests/responses and HTTP headers to meet business needs. In this article, the content rewriting rule will be used to redirect the website domain root directory URL to the subdirectory URL.
3. Create a Match Condition rule for the Content Rewrite rule. Select the object 'HTTP Request URL', and type to use as 'Regular Expression': (RegEx). Use the 'RegEx ^/$' which matches the root URL.
4. The Content Rewrite rule shall similar to the example below:
5. Go to the Virtual Server and edit the L7 HTTP/HTTPS application. Toggle to enable 'Content Rewriting' and select the Content Rewrite rule that is being created.
6. Redirection shall be activated once saving the Content Rewriting rule. Test browse the website to verify the redirect.
Related document: |