Forum Discussion
uri modification
I need a method to send a client to a particular port and URI whenever they access my site.
for example if the access my site at https://mysite.mydomain.com I want to send them to mysite.mydomain.com:50000/MessagingSystem/receive/CIDXAdapter/CIDX/
- Kevin_Stewart
Employee
There are three parts to this:
-
Port - this is provided by the pool members and address translation in the VIP.
-
Pool number in Host name - if this is actually required, an iRule can modify the Host header on entry.
-
The URI - this is a pretty straight forward iRule. Example:
when HTTP_REQUEST { HTTP::header replace Host "mysite.mydomain.com:50000" if { [HTTP::uri] equals "/" } { HTTP::uri "/MessagingSystem/receive/CIDXAdapter/CIDX/" } }
This assumes that you're simply changing the URI as it passes through the proxy, that you don't need the user to see this URI, and that any URI request that isn't empty will be passed through. If these assumptions aren't correct, please let us know.
-
- Chris_Broomes
Altostratus
This makes sense, but I think I omitted some very important information. I'm using the BIGIP as a reverse proxy to pass traffic from my external url "mysite.mydomain.com" to "myinternal.internal.com:50000/MessagingSystem/receive/CIDXAdapter/CIDX/". Sorry for the confusion.
- Thomas_Gobet
Nimbostratus
Do you want to keep the URI only for internal url ?
- Chris_Broomes
Altostratus
I'll answer 2nd question first. Yes I am terminating SSL on the BIGIP for the VS. I acutally want all clients to be sent to the URI on port 50000 and I don't care if they see the port or URI since I'm using SSL
- Thomas_Gobet
Nimbostratus
Ok, so you have to set your pool of webservers on port 50000. And then you can use the last part of the iRule given by Kevin
if { [HTTP::uri] equals "/" } { HTTP::uri "/MessagingSystem/receive/CIDXAdapter/CIDX/" }
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