Forum Discussion
Replace mutiple forward slash with one
Hello All,
I need to check if [HTTP::path] contains more than one forward slash (/) then replace all of them with single forward slash.
For e.g., if [HTTP::path] value comes as //abcd//xyz//abcd then it should get replaced with /abcd/xyz/abcd.
Thanks,
Shyam
- Lidev
Nacreous
Hi Shyam Shukla,
You can use a Local Traffic Policies to do this.
- Shyam_Shukla
Nimbostratus
Thank you for sharing the details.
I am wondering how it would handle if more than 2 forward slash are found in URI , for e.g. ////abcd//xyz///abcd as it would just check for 2 forward slashes and in the request URI there could be 2, 3 ...n number of forward slashes? Can regex be put in condition block of Local Traffic Policies?
Thanks,
Shyam
- Lidev
Nacreous
I think that the policy only check for 2 forward slashes and as far i kown, regex cannot be used in Local Traffic Policies.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com