Forum Discussion
URL rewite but keep uri is some cases
Sorry if this has been covered before but the seaches I have done have not returend any examples that I can use.
I am trying to redirect a url like www.xyx.com/log.nsf to connect-us.xyz.com/log.nsf
It can be anything after the "/" we want to keep
but if nothing after "/"then a redirect to https://connect-us.xyz.com
Should be simple but I have not gotten this one right yet
Thank you
Ed
5 Replies
- Kevin_Stewart
Employee
Try this:when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "www.xyz.com" } { "https://connect-us.xyz.com[HTTP::uri]" } }
Though the browser doesn't show it, there's ALWAYS a URI - even if it's just "/". - ebowers_25830
Nimbostratus
Was not able to get desired result
The url remains as www.
We are using F5 to IIS to a domino web page( IIS is the http stack for domino in this case).
A couple of interacting isapi filters also comming into play here.
If we can trigger the url line displayyed and sent as part of the header, we hope to allow IIS to folward via a asp redirect in cases nothing is sent after the /
but if /log.nsf or any other .nsf is sent then the asp redirect will not inter act.
Also looking at modifiy asp file to handle proper redirection.in place of using Irule
- Kevin_Stewart
Employee
Crud, mistyped the iRule example:when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "www.xyz.com" } { HTTP::redirect "https://connect-us.xyz.com[HTTP::uri]" } } - Kevin_Stewart
Employee
Or do you mean:when HTTP_REQUEST { if { ( [string tolower [HTTP::host]] equals "www.xyz.com" ) and ( [HTTP::uri] equals "/" ) } { HTTP::redirect "https://connect-us.xyz.com" } } - ebowers_25830
Nimbostratus
Thank you works as requested. Have a great day
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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