Forum Discussion
99Problems_4835
Nimbostratus
Jan 24, 2017v12 URL/URI Rewrite
I am in need of rewriting the url https://site1.domain.com to https://site2.sub.domain.com/widget in v12.x code. Best to use an iRule or a rewrite profile (for a non apm portal configuration)? What...
Vijay_E
Cirrus
Jan 25, 2017Untested:
when HTTP_REQUEST {
if { ([HTTP::host] equals "site1.domain.com") } {
HTTP::host [string map {site1.domain.com site2.subdomain.com} [HTTP:host]]
}
}
when HTTP_RESPONSE {
if { [HTTP::header values Location] contains "site2.subdomain.com" } {
HTTP::header replace Location [string map {site2.subdomain.com site1.domain.com} [HTTP::header value Location]]
}
}
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