Forum Discussion
katekattar_4936
Mar 04, 2009Nimbostratus
Simple append uri irule
Hi, I need to create a fairly simple irule but am having trouble. Essentially I need to append a different uri depending on the host. Eg.
www.lsc.co.uk should go to www.lsc.co.uk/pdg/lsc
www.lsc.com should go to www.lsc.co.uk/pdg/lsc
www.abc.co.uk should go to www.abc.co.uk/pdg/abc
I have tried this, but am getting a syntax error. What is the best way to do this irule?
when HTTP_REQUEST {
if {[HTTP::host] eq "www.londonsportscare.co.uk"} && {[HTTP::uri] eq "/"} {
HTTP::redirect "http://[HTTP::host]/pdg/london-sports-care"
}
}
Kind Regards
Kate
- Deb_Allen_18Historic F5 AccountYou're on the right track if you want redirects, but might you really want URI re-writing?
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects