Author Topic: rewrite or url transform  (Read 1162 times)

Offline mulhollandm

  • Contributor
  • *
  • Posts: 5
  • Karma: 0
rewrite or url transform
« on: January 06, 2012, 07:10:59 AM »
folks

i want to try a simple url transfrom

i want users who access www.myexternalurl.com to be be directed to http://myinternalurl:8080 and the content then to be returned as www.myexternalurl.com

i've set up a url transform

add transform profile transform-profile
add transform action transform-action transform-profile 1
set transform action transform-action -priority 1 -reqUrlFrom "http://www.myexternalurl.com/(.*)" -reqUrlInto "http://myinternalurl:8080$1" -resUrlFrom "http://myinternalurl:8080" -resUrlInto "http://www.myexternalurl.com/"
add transform policy transform-policy TRUE transform-profile
bind transform global transform-policy 1

i can get to the home page ok but if i add a page of the site, i.e. www.myexternalurl.com/admin or www.myexternalurl.com/webportal nothing is returned

any ideas folks?

thanks to anyone taking the time to view or reply to this
 





Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: rewrite or url transform
« Reply #1 on: January 06, 2012, 07:37:18 AM »
at the service you can add the server, and specify that the http daemon is running on port 8080

Then, add a rewrite rule, that has the action to replace the hostname,

Its pretty simple.

Offline mulhollandm

  • Contributor
  • *
  • Posts: 5
  • Karma: 0
Re: rewrite or url transform
« Reply #2 on: January 06, 2012, 12:37:32 PM »
mkalle

many thanks for your reply

i have the vserver, service and server already configured but its still not working properly

are you suggesting a rewrite rather than a url transform rule?

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: rewrite or url transform
« Reply #3 on: January 07, 2012, 01:38:26 AM »
Yes

Exactly. Rewrites over URLtransformation. Also in netscaler world the hostname is not part of the URL, so i dont even know if URLtransformation can do what you want.

I will try and come with some configuration examples monday, i dont have access to a netscaler at home.

Offline mulhollandm

  • Contributor
  • *
  • Posts: 5
  • Karma: 0
Re: rewrite or url transform
« Reply #4 on: January 08, 2012, 12:45:06 PM »
mkalle

i think i have resolved the issue though i'm still waiting on the developers to verfiy with more detailed testing than i have been able to carry out as yet

i modified my transform and so far its looking good

i'll post an update when i get feedback from the developers

thanks again

revised config:

add transform profile transform-profile
add transform action transform-action transform-profile 1
set transform action transform-action -priority 1 -reqUrlFrom "http://www.myexternalurl.com/" -reqUrlInto "http://myinternalurl:8080" -resUrlFrom "http://myinternalurl:8080" -resUrlInto "http://www.myexternalurl.com/"
add transform policy transform-policy TRUE transform-profile
bind transform global transform-policy 1




Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: rewrite or url transform
« Reply #5 on: January 09, 2012, 01:03:16 AM »
add rewrite action RA_example replace "HTTP.REQ.HOSTNAME.REGEX_SELECT(re/.*/)" "\"myinternalurl\""
add rewrite policy RP_example "HTTP.REQ.HOSTNAME.EQ(\"www.myexternalurl.com\")" RA_example


and the bind the policy where you want it.