Forum Discussion
Wes_98712
Nimbostratus
Mar 30, 2007rewrite HTML in response
Interesting dilemma we have here. We are about to release a new version of a site we own, but don't have time to change the HTML on a particular page, essentially the hyperlink points to site that wi...
Wes_98712
Nimbostratus
Mar 30, 2007BTW I had thought the following would work, but no dice, it doesn't find anything, so I must be misinterpreting the function of the regsub or possibly the HTTP::payload
when HTTP_RESPONSE {
set old_link "www.somesite.com/someuri"
set new_link "host.somesite.com/somenewuri"
if { [regsub -all {$old_link} [HTTP::payload] $new_link newdata] } {
log "Replacing $old_link with $new_link"
HTTP::payload replace 0 [HTTP::payload length] $newdata
HTTP::release
} else {
log "replacing nothing"
}
}What am I doing wrong here?
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
