Jnon
Jan 26, 2018Nimbostratus
Rewrite host header from uri on initial request only
I am trying to use an irule to manipulate host header from contents of the URI string.
For example: myhost.mydomain.com/myvar1/myvar2/ needs to be rewritten as myvar1.myvar2.myhost.mydomain.com/
I can do with the getfields and move the values, but I only want those values to be rewritten initially, to set the host, but after that, I don't want all subsequent calls to be rewritten, so /static/myjsp I don't want rewritten as static.myjsp.myhost.mydomain.com How can I scrape the initial request uri, but not subsequent, if I use an if statement and check for if uri starts_with myvar, then manipulate string. Is that going to retain my host header from the initial rewrite?