Forum Discussion
lchln_304378
Nimbostratus
Jan 05, 2017event disable HTTP rewrite
Hi guys,
Currently migrating a legacy web application using Apache over to F5. Unfortunately, due to the nature of the application there are specific rewrites that need to occur so it works. Due to...
Vijay_E
Cirrus
Jan 06, 2017May be I am overlooking something but on first glance, both your iRules look the same. If you are trying to make sure that the client sees "a.domain.com" but the server sees "domain.com", you need something like this:
when HTTP_REQUEST {
if { [HTTP::host] contains "a.domain.com" } {
HTTP::host [string map {a.domain.com domain.com} [HTTP::host]]
pool POOL-DEV2
}
}
when HTTP_RESPONSE {
if { [HTTP::header values Location] contains "domain.com" } {
HTTP::header replace Location [string map {domain.com a.domain.com} [HTTP::header value Location]]
}
}
You can potentially include the HTTP::uri logic within the iRule to achieve your goal.
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
