Forum Discussion

mtobkes_64700's avatar
mtobkes_64700
Icon for Nimbostratus rankNimbostratus
Oct 23, 2014
Solved

iRule - Prepend Path to URI

Hoping someone can point me in the right direction...   I need to prepend /abc to all requests to www.host.com. I cannot use redirects.   Request: www.host.com/testing   Needs to hit the ser...
  • mimlo_61970's avatar
    Oct 23, 2014

    For reasons I can't explain, string map is not matching [HTTP::uri]

    Since this is a simple prepend, you could do this instead

    when HTTP_REQUEST {
        if { [HTTP::host] starts_with "www.host.com"}{
            HTTP::uri "/abc[HTTP::uri]"
        }
    }