I created a simple Irule to do a redirect, but when I test this it takes me to the wrong page beacause it add a / to the end of the url string which I do not require,
Could some one please help with my problem
Thanks
Paul
when HTTP_REQUEST {
Check host header value
if {[string tolower [HTTP::host]] eq “des.dorsetcc.local”}{
What exactly are you trying to redirect users to? Since you’re putting [HTTP::uri] at the end of the iRule, it’s going to insert the “/” because that’s the URI they’re specifying.
If you go to, www.google.com for instance, your browser will likely look for the uri “/” at host “www.google.com”.
In your case, “/” is the URI, hence why it’s being appended.
If the clients could be sending a request to the original hostname with a full query string, you should consider URL encoding the original URI before appending it to the new URI using the URI::encode command. See this post for more info: