Forum Discussion
URI Redirection with URI Allow
Hello I'm configuring LTM to redirect traffic for "/" to /frontend-web/app/auth.html and also I want to allow only URIs that contain /frontend-web/app/ and /frontend-web/api/ for that website. I configured data group and using below iRule, but redirection part is not working, when I'm accessing https://site.com connection is reset. Blocking part works fine. Can you help me with that ?
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] equals "/" } {
HTTP::redirect "https://[HTTP::host]/frontend-web/app/auth.html"
}
if { [ class match [string tolower [HTTP::uri]] contains uri_allow ] } {
return }
else {HTTP::respond 200 content "URL Blocked" }
}
- P_K
Altostratus
I would think probably your block statement is matching the request and getting a reset.
try adding some logging to the irule and see if it is matching the redirect or block statment. If your data group is properly done, then try below irule and see if that works someway..
when HTTP_REQUEST {
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