Forum Discussion

steven_normole's avatar
Jun 08, 2025
Solved

URI Redirect

I thought it would be simple, but i guess i am just too thick. I need to have a redirect done, only if the URI does not contain a certain URI. If the URI contains /vss-df,  or /vvs-df/appoitnment, ...
  • Injeyan_Kostas's avatar
    Jun 08, 2025

    Hello, you were close but equals and ne cannot be used with wildcard 

    try this

    when HTTP_REQUEST

    {
        if { [HTTP::host] contains "<hostname>" }

        {
            if { !([HTTP::uri] contains "/vvs-df") }

           {
                HTTP::redirect "https://<redirect-URL>"
            }
        }
    }