Forum Discussion
lnewton
Altostratus
Mar 22, 2024URL 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...
- Mar 25, 2024
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.
Mar 22, 2024
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
Mar 25, 2024I 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.
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