Forum Discussion
Help iRule Redirection to the same VIP
I have an URL abc.xxx.com that i wanted to redirect to abc.xxx.com/site/ when the user type the URL. I tried with the following URL. it just adds /infosell// many times and doesn't work.
when HTTP_REQUEST {
if { [HTTP::host] equals "www.joe.com"} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]/infosell/"
}
}
With the simple redirect rule below, i get redirect loop in the browser. I am a newbie to iRules
when HTTP_REQUEST {
HTTP::redirect "https://[HTTP::host]/infosell/"
}
Can anyone help?
Thank you for help
- Minn_62043CirrostratusYou can write something like this:
when HTTP_REQUEST { if { not ([HTTP::uri] starts_with "/infosell/") } { HTTP::redirect https://[HTTP::host]/infosell/ } }
- Colin_Walker_12Historic F5 AccountI think what you're looking for is something like:
when HTTP_REQUEST { if { ([HTTP::host] eq "www.joe.com") && !([HTTP::uri] starts_with "/infosell") } { HTTP::redirect "https://[HTTP::host]/infosell" } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com