Forum Discussion

markj_58101's avatar
markj_58101
Icon for Nimbostratus rankNimbostratus
Dec 08, 2015

URL re-write profile not working

I am trying to use the URL Re-write profile feature of the LTM, I have never used this feature before but it seems fairly straight forward to configure. I am trying to do the following:

 

When a user hits the outsite URL, www.website.com the internal request is server1.internal.com/application I have setup a re-dwrite profile and attached it to the VIP but it doesn't seem to be taking effect. It seems to just hit the root of the internal web server in the pool. I even tried changing the internal URI (the Server URI) to a non existent value http://test.com/xyz/ and it still just loads the website home page. It almost seems like it's ignoring the profile. I am defintely configuring the correct VIP etc.

 

My next step was to try and configure it via an Irule. I looked at an existing example on Devcentral and used the one below but it doesn't seem to like the sytax.

 

Irule I am trying to use:

 

 

I get the following error:

 

 

Any help with either would be appreciated.

 

Thanks

 

5 Replies

  • I can't see the issue on the screenshot provided. But you may want to try this snipped...

    when HTTP_REQUEST {
        if { ( [string tolower [HTTP::host]] equals "www.website.com" ) and ( [HTTP::uri] equals "/" ) } {
            HTTP::header replace host "server1.internal.com"
            HTTP::uri "/application"
        }
    }
    

    Cheers, Kai

  • Sorry I figured it out just after I posted my response so I deleted the post. I took off the "/" on the end /application/ and it works a treat now.

     

    Thanks a lot Kai.