Forum Discussion
Mayank
Jul 15, 2019Nimbostratus
F5 redirect context path to APACHE Web Server.
Hi there, I’m assisting one of my customer to integrate our software with F5. I was told that currently, F5 is configured using the Context Path (/abc) which redirect to my application’s...
iaine
Jul 17, 2019Nacreous
Yep, before the request is passed to the web server, the /abc get stripped off and the host header gets changed.
To send a 404 back to the client when browsing to /, the following will do it. You can pimp this up as much as you need to
when HTTP_REQUEST {
if {[HTTP::uri] equals "/"} {
HTTP::respond 404 content "<HTML><BODY>404 Page Not Found</BODY></HTML>" noserver
return
}
if {[HTTP::host] contains "example.com.au" } {
if {[HTTP::uri] starts_with "/abc/" } {
HTTP::uri [string range [HTTP::uri] 4 end]
}
HTTP::header replace Host "abc.com.au"
}
}
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