Forum Discussion
mj16othman
Oct 04, 2023Altostratus
Client Browser URL manipulation
Dears
I have a request. I hjave clients trying to access the URL "https://abc.com:7443" but i want to remove the :7443 from the URL after the backend server response to the request and the URL to look like this "https://abc.com"
Ive tried everything with an irule but its not working
when HTTP_RESPONSE {
if {[HTTP::host] contains ":"}{
HTTP::redirect "https://[getfield [HTTP::host] ":" 1][HTTP::uri]"
}
}
- SnlCirrostratus
give a try
when HTTP_REQUEST { HTTP::header remove Accept-Encoding STREAM::disable } when HTTP_RESPONSE { if { [HTTP::header exists Location] } { HTTP::header replace Location [string map -nocase {"abc.com:7443" "abc.com"} [HTTP::header Location]] } if { [HTTP::header Content-Type] contains "text" } { STREAM::expression {@abc.com:7443@abc.com@} STREAM::enable } }
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