Forum Discussion
jondyke_46152
Nimbostratus
Jul 15, 2011https to https redirect to different hostname
I know there are a bunch of redirect irules out there already (I have a few I am already playing with) but I was wandering if how straight forward it would be to do the following:-
SiteA is...
jondyke_46152
Nimbostratus
Aug 02, 2011Turns out that is not what they wanted at all. What they wanted was to change the middle of the URL whilst leaving the ending alone.
So for example:- http://joe.bogs.com/DocumentRenderer.svc/xxxxx/yyyyy/ to http://dave.jones.com/folder/folder/DocumentRenderer.svc/xxxxx/yyyyy/
Not tested it yet but wandering is this would work?
when HTTP_REQUEST {
Check if path starts with http://centraldatawebpublicdev.assureweb.co.uk/DocumentRenderer.svc
if { [string tolower [HTTP::path]] starts_with "/DocumentRenderer.svc"}{
Replace https://centraldatawebpublicdev.assureweb.co.uk/DocumentRenderer.svc with
https://aswmaindev.assureweb.co.uk/UiServices/UiServices.Public/DocumentRenderer.svc in the path
HTTP::redirect [string map {https://centraldatawebpublicdev.assureweb.co.uk/DocumentRenderer.svc https://aswmaindev.assureweb.co.uk/UiServices/UiServices.Public/DocumentRenderer.svc} [string tolower [HTTP::path]] ]
}
}
If this does work then they I am assuming that they are still going to get an issue with https is used as the hostnames are different.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects