rewrites
3 TopicsRewrite Profile JSON error
Hey Everyone, We are using a rewrite profile to do the following: Converting Client URI = https://customer.company.com/loginpage/ to Server URI = https://login.company.com/ Everything looked fine but some users i guess have more access on the backend and are getting a JSON error. Should I be using Irules instead?Solved663Views0likes3CommentsRedirect Issues
I have a redirect profile set up to perform URI translations. It is set to translate: https://abc.com to https://def.com This rule works, but it works both ways. Not only does abc translate to def, but def can redirect to abc. The customer does not want this to work both ways. Any way I can disable "def" from redirecting to "abc"?234Views0likes1CommentPossible Rewrite Issues
For the longest time we only had the APM licensed and not the LTM module. This prevented me from using rewrite profiles in my designs and infrastructure. For rewrites I used the following iRule: when RULE_INIT { Log debug output to ltm logs - 1=yes, 0=no set rwdebug 0 } when HTTP_REQUEST { Set up variables for the irule and sets the default behavior of the STREAM profile. . set chk_resp_rw 0 set rwdebug 0 set clientHost "externalname.domain.com" set serverHost "servername.domain.com" STREAM::disable Below check if the http request is from the HOST and starting URI that requires the rewrite. if {[string tolower [HTTP::host]] equals $clientHost} { HTTP::header replace Host $serverHost HTTP::uri /externalname/[HTTP::uri] set chk_resp_rw 1 if {$rwdebug}{ log local0. "Host Rewrite: [HTTP::host] , Context URI = [HTTP::uri]"} } } when HTTP_RESPONSE { Check server response for rewrites if {$chk_resp_rw}{ STREAM expression changes all references in the response payload with the desired rewrite if {[HTTP::header value Content-Type] contains "text"}{ STREAM::expression @$serverHost@$clientHost@ STREAM::enable if {$rwdebug}{ log local0. "response Rewrite done: "} } Check Location header for desired rewrite if { [HTTP::header exists Location]}{ HTTP::header replace Location [string map -nocase {$serverHost $clientHost} [HTTP::header Location]] } } } Everything seemed to work fine until we purchased the licensing for the LTM module. I am trying to do the following rewrite: https://externalname.domain.com -> https://servername.domain.com/externalname Just wondering if this my irule no longer works because we have the LTM module or should i be using the rewrite profile?185Views0likes0Comments