Forum Discussion
Chris_Chaloux_1
Nimbostratus
Dec 08, 2008Avoiding the loop...
All -
A new question that I'm working on in my mind.
Lets say I have a URL, i.e. www.mysite.com. For various reasons, I want to put up a "temp out of service" page that contains html, CSS, and image references. The html page lives in a location that would read - www.mysite.com/error/, and the assests (the css and image files) live in /error/images. So, for any requests the redirect would serve up:
http://www.mysite.com/error/service.html.
I can get the service.html file to work just fine, but the page then loops on the redirect attemps when fetching the images and CSS.
Is there a way that I can explicitly allow in the rule to serve up only this content and avoid the loop? How are other people doing this without hosting the files on another vip / pool?
I currently have this rule working fine:
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "mysite.com") and ([string tolower [HTTP::uri]] ne "/error/service.html") } { HTTP::redirect "http://mysite.com/error/service.html" }}
Can I also use the NE clause for the images, and CSS?
Thanks for any suggestions!
Chris
- hoolio
Cirrostratus
Hi Chris,when HTTP_REQUEST { if { ([string tolower [HTTP::host]] equals "mysite.com") and not ([string tolower [HTTP::uri]] starts_with "/error/") } { HTTP::redirect "http://mysite.com/error/service.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