Forum Discussion
vkoprivica_9683
Nimbostratus
Jul 19, 2013Redirect url to display blank page
Hi, I have a request to redirect url requests to show blank page. Could this be possible using Irules.
Thank you.
Kevin_Stewart
Employee
Jul 19, 2013Sure.
The first line is the event declaration. You want this code to fire when a client makes an HTTP request, so you'll wrap it in the HTTP_REQUEST event.
The next line is the conditional argument. What you're essentially saying is, if the lowercase version of the request URI (the part AFTER the host name) starts with "/foo" (an arbitrary example), perform the following process. The actual URI will be dependent on your environment (what you want to trigger on).
Finally, the HTTP::respond command allows you to preempt the server response, if there was one, and send your own response to the client instead. In this case we're going to send a 200 message (HTTP status code for "OK"), and some arbitrary content, in this case absolutely nothing "". You could literally send anything you wanted with this command - an HTML page, an image or file, JavaScript, css, anything.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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