Forum Discussion

Julio_Navarro's avatar
Julio_Navarro
Icon for Cirrostratus rankCirrostratus
Jul 22, 2019

Scrub/Replace double backslashes

Hi,

Given this example, www.somewhere.com/folder/folder2//page, which is the must efficient way to scrub the two backlashes to one, ending with www.somewhere.com/folder/folder2/page..... a policy?

 

Thanks

 

J

1 Reply

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    A policy is preferred and is more efficient. Here's the policy rule for this:

            check_double_slash {
                actions {
                    0 {
                        http-uri
                        replace
                        path "tcl:HTTP::uri [ string map {// /} [HTTP::uri]]"
                    }
                }
                ordinal 5
            }

    .