Forum Discussion
Carl_Zemke_1882
Nimbostratus
Jun 06, 2007UIR rewrite based on Hostname
Sorry for being so ignorant with IRules but for the life of me, I can't seem to get anything working correctly here.
I need a Rule that will rewrite the URI portion of a HTTP request based o...
JRahm
Admin
Jun 06, 2007Try this:
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals "awww.something.com") } {
HTTP::uri "/directory1[HTTP::uri]"
} elseif { ([string tolower [HTTP::host]] equals "bwww.something.com") } {
HTTP::uri "/directory2[HTTP::uri]"
} else { discard }
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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