Forum Discussion
boneyard
MVP
Jun 20, 2012http and https redirect in one irule
i got two virtual servers, one for port 80 (http) and one for port 443 (https), is it possible to create one irule which can be used on both servers and where when used on the http server the redirects are done to http://... and on the https server the redirects are done to https://...
is this easily possible or would i be better off writing two irules?
5 Replies
- Arie
Altostratus
Shouldn't be hard to do, just include a snippet to sniff out the port. - Arie
Altostratus
Shouldn't be hard to do, just include a snippet to sniff out the port. - Michael_Yates
Nimbostratus
Hi boneyard,
You could use URI::protocol, key off of the TCP::local_port, or you could look at the HTTP Profile in the "Redirect Rewrite" option.
Hope this helps. - hoolio
Cirrostratus
Hi Boneyard,
You could do this in one iRule by checking the TCP::local_port or SSL::mode values. But I think it's simpler and more efficient to just write separate iRules for HTTP and HTTPS.
Aaron - ok, thanks for all the answers, ill see if i can work out the single iRule just for experience and see how complex it becomes.
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
