Forum Discussion
tacobell_112236
Mar 04, 2011Nimbostratus
IRule Disaster
I'm running F5 LTM ver 9....and when I add IRule to VS I get "internet cannot display page" BUT Once I remove IRule I get the website....
i need to alllow only my datagroup access to the ur...
tacobell_112236
Mar 05, 2011Nimbostratus
Ok Im replying to myself b\c I am getting some progress (thanks 2 Chris Miller on this forum)...I added log entries to the beginning and now I can see the clients URI & host on the LTM logs and I am not blocking external addresses.
Even though its progress I cant seem to get the redirects working correctly - irule sees the website and ip address and the corresponding group but doesn’t seem to redirect based on that results.....
when HTTP_REQUEST {
log local0. "client IP is [IP::client_addr]"
if { ![matchclass [IP::client_addr] eq address_datagroup] } {
log local0. "client host is [HTTP::host]"
log local0. "client uri is [HTTP::uri]"
if { [string tolower [HTTP::host]] equals "xxx.xxx.com" and [matchclass [string tolower [HTTP::uri]] starts_with xxx.xxx.xxx_uri_datagroup] } {
HTTP::redirect "http://xxx.xxx.com" }
elseif { [string tolower [HTTP::host]] equals "xxx.xxx.com" and [matchclass [string tolower [HTTP::uri]] starts_with www_xxxxxxxxx_com_uri_datagroup] } {
HTTP::redirect "http://www.xxxxxxxxx.com" }
elseif { [string tolower [HTTP::host]] equals "xxx.xxx.xxx.x.com" and [matchclass [string tolower [HTTP::uri]]starts_with www_xxxxxxxxxx_com_uri_datagroup] } {
HTTP::redirect "http://www.xxxxxxx.com" } }
elseif { [string tolower [HTTP::host]] equals "xxxxxxxx.com" and [matchclass [string tolower [HTTP::uri]] starts_with xxxxxxxxxxx_com_uri_datagroup] } {
HTTP::redirect "http://xxxxxxxxxx.com" } }
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