Forum Discussion

keenon_49862's avatar
keenon_49862
Icon for Nimbostratus rankNimbostratus
Dec 09, 2014

URI rewrite/replace character

quick history of what i'm doing and then what i'm hoping to do.

 

First i have a irule that redirects incoming url requests in on a vip and maps them to the internal virtual servers matching that name these are used internally for testing in our network. I can post the irule if needed. I would like to extend these externally for testing as well. Now the issue presented is that i'm looking at how to extend to external.

 

Example: internally we would use dev2_test@test.com externally we would use dev2-test@test.com

 

Now to only entry created on F5 would be the internal which would be dev2_test@test.com

 

is there a way to have an irule change/set the underscore to a dash this would only happen on the external facing vip + irule so essentially an external request would come in as dev2-test@test.com and get rewrote to dev2_test@test.com

 

please keep in mind this is not for just 1 vip but has to scale to 100s

 

3 Replies

  • i think it may be easier to understand what you are trying to do if you can post the current irule.

     

  • was not sure i needed another irule prior to this one to do the underscore replace with a dash or if i could just add it before set vsname [string tolower [HTTP::host]]

     

  • is there a way to have an irule change/set the underscore to a dash

    is string map usable?

    % set h dev2_test
    dev2_test
    
    % string map {_ -} $h
    dev2-test