Forum Discussion

Chip_Hudgins_64's avatar
Chip_Hudgins_64
Icon for Nimbostratus rankNimbostratus
Jun 15, 2005

problem with rewrite

I am trying to rewrite a URL and have the following iRule which I believe should work:

 

 

when HTTP_REQUEST {

 

set DEBUG 0

 

if { $FINISHED } {

 

return

 

}

 

 

if { $DEBUG } {

 

log local0. "rewrite dev"

 

log local0. "[HTTP::host]"

 

log local0. "[HTTP::path]"

 

}

 

 

if {[HTTP::path] starts_with "/groups/IR/bin/secure/facsurvey.cgi" } {

 

log local0. "rewrite fac cgi"

 

log local0. "pre - [HTTP::path]"

 

HTTP::path "/groups/cit/bin/secure/facsurvey.cgi"

 

log local0. "post - [HTTP::path]"

 

 

pool gwizdev-pool

 

set FINISHED 1

 

return

 

}

 

}

 

 

From the ltm logs, I get the following when I goto the page "/groups/IR/bin/secure/facsurvey.cgi"

 

 

Jun 14 17:37:13 tmm tmm[18823]: Rule gwzdev_rewrite : rewrite fac cgi

 

Jun 14 17:37:13 tmm tmm[18823]: Rule gwzdev_rewrite : pre - /groups/IR/bin/secure/facsurvey.cgi

 

Jun 14 17:37:13 tmm tmm[18823]: Rule gwzdev_rewrite : post - /groups/IR/bin/secure/facsurvey.cgi

 

 

As you can see, the command HTTP::path "/groups/cit/bin/secure/facsurvey.cgi" is not working (or I am doing something wrong).

 

 

Is there something wrong with the way I wrote the iRule or is there something wrong with the F5? Any help is appreicated.

 

 

 

 

Thanks for your help.

 

Chip