Forum Discussion
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
You're welcome... ;-)
Cheers, Kai
- markj_58101Nimbostratus
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.
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
- markj_58101Nimbostratus
Ah yes, I see that now. Let me give that a try. Thank you Kai
Hi Markj,
you have to specify an iRule Event that executes your handcrafted code. https://devcentral.f5.com/articles/-the101-irules-101-events-amp-priorities
For this specific task the event HTTP_REQUEST could be used.
when HTTP_REQUEST { Place your code here }
Cheers, Kai
Recent Discussions
Related Content
* 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