Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Ragman
New Contributor II

FortiWeb URL rewrite rule that captures variable part of the URL

I need some guidance on configuring a FortiWeb URL rewrite rule. I have URLs like this: 'https://example.com/placeholder/123,' where the end part, '/123,' can be any numeric value. My goal is to create a FortiWeb URL rewrite rule that captures this variable part of the URL and carries it over to the new rewritten URL.

 

Could someone kindly provide step-by-step instructions on how to set up such a rule in FortiWeb? I understand that I may need to use regular expressions and backreferences, but I'm relatively new to FortiWeb, and any assistance you can provide would be greatly appreciated!

1 REPLY 1
saneeshpv_FTNT

Hi @Ragman 

 

May be the attached expression may help you. I haven't tested it but you may try it yourself to see if it works.

 

It matches "path/placeholder/Remaining URL" and then replace with "path/newplaceholder/Remaining URL".  You can validate the Regex from the FortiWeb before apply the URL rewrite your VS Server policy.

 

Some reference here:

https://docs.fortinet.com/document/fortiweb/7.4.0/administration-guide/999319/appendix-e-regular-exp...

 

Let me know your thoughts and if any additional questions you may have. 

Best Regards,

 

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors