Forum Discussion
How Can we Redirect the below Requirement
Currently, the https://kauffman.xyz.com URL points to http://ktprdapp1.xyz.com:7001
How can we add one more URL like below: The F5 url https://kauffman.xyz.com/ibmcognos should point to http://ktprdapp1.xyz.com:80/ibmcognos
Do we need to create one more pool: to mark the active member for port:80 for the new URL and than to call the same in irule ? This needs to be accessible via Internet.
Kindly assist ?
8 Replies
- Kevin_Stewart
Employee
So just to be clear, external users access the site using "https://kauffman.xyz.com", which is a VIP on the F5. You want any request to "/ibmcognos" to go to a port 80 pool, and then everything else to go to a port 7001 pool. Correct?
If so, then:
-
Define a port 7001 pool (ex. "my_7001_pool") - assign this as the default pool in the VIP configuration
-
Define a port 80 pool (ex. "my_80_pool")
-
Define an iRule like the following:
when CLIENT_ACCEPTED { set default_pool [LB::server pool] } when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/ibmcognos" } { pool my_80_pool } else { pool $default_pool } }
-
- Parveez_70209
Nimbostratus
Hi Kevin,
Thank you. So,Just to me more clear.
-
We have to select manually the pool created against port 7001 in the virtual server and than we have the suggested script will work right ?
-
I mean do I Need to mention the 'name of the pool against port 7001' into the script or "default_pool" in the script will work ?
Kindly suggest.
Thanks and Regards Parveez
-
- nitass
Employee
- We have to select manually the pool created against port 7001 in the virtual server and than we have the suggested script will work right ?
yes
- I mean do I Need to mention the 'name of the pool against port 7001' into the script or "default_pool" in the script will work ?
no need. [LB::server pool] will return pool name which is assigned to virtual server.
- Kevin_Stewart
Employee
We have to select manually the pool created against port 7001 in the virtual server and than we have the suggested script will work right ?
Yes, but you don't have to. You could just as easily call it out in the iRule:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/ibmcognos" } { pool my_80_pool } else { pool my_7001_pool }}
The code in the CLIENT_ACCEPTED event gets the pool that is statically assigned to the virtual server.
- Parveez_70209
Nimbostratus
Hi All,
The requirement is working just perfect from internally, but from Internet users are failing to browse, its getting 404 error.
Kindly suggest.
Thanks and Regards Parveez
- Kevin_Stewart
Employee
Are there any differences between the internal and external client requests? Based on the iRule you're simply switching between pools based on the URI in the request. Are external users getting an immediate 404 or after some specific request? Do you have a OneConnect profile assigned to the VIP?
- Parveez_70209
Nimbostratus
Currently Kevin no oneconnect profile associated with it, only HTTP profile.
External means accessible via Internet which currently they are failing with /ibmcognos.
- Kevin_Stewart
Employee
External means accessible via Internet
Understood. Is it just requests for /ibmcognos? Other requests work?
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