Forum Discussion
Scouse_142981
Nov 08, 2017Nimbostratus
Advise and help is needed, Irule & ifile
Hi Everyone,
I am quite new to iRules and iFiles, so i am looking for some help and guidance here.
Basically there is a requirement from the Application team whereby they are asking my hel...
Jinshu
Nov 08, 2017Cirrus
Hello,
Please follow below steps.
Import the iFile navigating to System ›› File Management : iFile List ›› import. Add the imported ifile to LTM Local Traffic ›› iRules : iFile List >> create. Attach below irule (Make sure you have renamed the ifile name accordingly.
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals "abc.com") and (![string tolower [HTTP::uri]] equals "w2whome") } {
HTTP::respond 200 content [ifile get maintenance.html] "Content-Type" "text/html"
}
}
Please test it and let me know.
-Jinshu
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