Forum Discussion
irule url host replacement
- Jun 12, 2023
Fernando_M I believe what you're looking for is the following. I believe the only gotcha would be that you are perform SSL termination on that virtual server and you have an HTTP profile associated to it and then add this iRule to the virtual server in question. If you need this on the HTTP side you can use the same iRule as long as your intent is to keep everyone on HTTPS.
when HTTP_REQUEST priority 500 { if { [HTTP::host] == "url.domain.com" } { HTTP::redirect "https://newurl.domain.com/[HTTP::uri]" } }
Fernando_M I believe what you're looking for is the following. I believe the only gotcha would be that you are perform SSL termination on that virtual server and you have an HTTP profile associated to it and then add this iRule to the virtual server in question. If you need this on the HTTP side you can use the same iRule as long as your intent is to keep everyone on HTTPS.
when HTTP_REQUEST priority 500 {
if { [HTTP::host] == "url.domain.com" } {
HTTP::redirect "https://newurl.domain.com/[HTTP::uri]"
}
}
Hello Paulius,
Thank you for your feedback
I tested this and it's working perfectly until now, I will close post now with accept solution
Thank's again,
Recent Discussions
Related Content
* 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