Forum Discussion
lnewton
Altostratus
2 years agoURL rewrite
I'm trying to figure out how to write a policy or iRule that will modify a URL For an example, a number of URLs (url1.mycompany.com, url2.mycompany.com, url3.mycompany.com, etc) point to a virtua...
- 2 years ago
We finally figured it out. We solved our issues by just re-issuing our SSL cert using as a multi-domain cert which incorporates these new domains.
2 years ago
Hi lnewton,
Can you add default stream profile to virtual server and try the iRule?
when HTTP_REQUEST {
STREAM::disable
if { ([HTTP::host] ends_with ".mycompany.com") && not ([HTTP::host] ends_with "ce2.mycompany.com") } {
HTTP::host [string map {"mycompany.com" "ce2.mycompany.com"} [HTTP::host]]
}
}
when HTTP_RESPONSE {
STREAM::disable
if { [HTTP::header Location] contains "ce2.mycompany.com" } {
HTTP::header replace Location [string map {"ce2.mycompany.com" "mycompany.com"} [HTTP::header Location]]
}
if { [HTTP::header value Content-Type] contains "text" } {
STREAM::expression {@ce2.mycompany.com@mycompany.com@}
STREAM::enable
}
}
lnewton
Altostratus
2 years agoI did find the default stream profile and added it to the virtual server and then was able to add the iRule, but it didn't seem to work... Assuming that I did it correctly.
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