Forum Discussion
Mike_Martinkus
Nimbostratus
Aug 21, 2019Forcing a 404 message after rejecting a URI
I need to for a 404 message after my Irule rejects several URI's. This is my IRULE for the reject:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] {
"/favicon.ico*" -
"/admin-console*" -
"/jbossws*" -
"/jmx-console*" -
"/web-console*" - {
pool xxx.xxx.xxx_8443_pool
}
reject
}}
- Andrew-F5
Employee
when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] { "/favicon.ico*" - "/admin-console*" - "/jbossws*" - "/jmx-console*" - "/web-console*" - { pool xxx.xxx.xxx_8443_pool } default { reject HTTP::respond 404 content { <html> <head> <title>Page not found</title> </head> <body> We are sorry, but the page you are looking for was not found<br> If you feel you have reached this page in error, please try again. </body> </html> } } }
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