Forum Discussion
HTTP 404 ERROR HANDLING through IRULE
Hi Jason ,
Thanks for writing me back .
The bad matches are no longer matching .This is the irule I am using as POC :
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
set uri [HTTP::uri]
if {$host equals "xyz.apac.com."} {
set context [getfield $uri "/" 2]
if {($context ne "archiacserver") and ($context ne "archiacportal") and ($context ne "archiac")} {
HTTP::respond 404 content {Page Not Found Page Not Found}
} elseif { ($uri starts_with "/archiacserver")} {
HTTP::uri [string map {"/archiacserver" "/archiac"} [HTTP::uri]
pool PL_BNE_ENT_6443
return
} elseif {$uri starts_with "/archiac"} {
pool PL_BNE_ENT_6443
}elseif {$uri starts_with "/archiacportal"} {
pool PL_BNE_ENT_archiacportal_443
return
}
}
}
Regarding the error , I found I need to set x-forwarded for host with the HTTP profile and also at the server end they need to set a web context URL for re-write .
The issue is now fixed . Thanks !
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