Forum Discussion
kiamars_51328
Nimbostratus
May 18, 2009How can I get rid of the port on redirects.
Hi, I can redirect to new port, but how can i elemenated the port, I don't want to see the port that I am redirecting.
thx for your time.
10 Replies
Sort By
- hoolio
Cirrostratus
- The_Bhattman
Nimbostratus
Take a look at the following. It's not the exact item you are looking for but it's close enough that you can replace the event and make it work. - The_Bhattman
Nimbostratus
Looks like you beat me too it :-) - kiamars_51328
Nimbostratus
Thank you - kiamars_51328
Nimbostratus
hi, I am new tp irule, would you give me an exmple, - hoolio
Cirrostratus
What port is the virtual server defined on? What port are the pool members defined on? Do the web servers require that the Host header value contain the port number (ie, is the virtual host definition expecting the port to be explicitly listed)?when HTTP_REQUEST { Check if host header does not have port already if {[string length [getfield [HTTP::host] ":" 2]] <= 0}{ Append the port to the host header value HTTP::header replace Host "[HTTP::host]:300" } }
- kiamars_51328
Nimbostratus
Thx for reply, I can strip off the port from browser but I am also trying to send it to another directory or applect on webser how do that using above code that you provide to me. - hoolio
Cirrostratus
You can modify the path with HTTP::path (Click here) or the full URI with HTTP::uri (Click here). - Ken_Cottrell
Nimbostratus
This is a cool rule and works around the issue, but is there a way to fix this on the application server? WAS in our case? - L4L7_53191
Nimbostratus
@skynard: If I recall this should all be handled correctly by the plugin configuration. Be sure and add a virtual host to the application server for this application, then re-generate your plugin. This (or something very close to it) should do the trick.
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