Forum Discussion
HTTPS Traffic to redirect into HTTP
When accessing URL https://www.abc.com/404.php but HTTPS is not enabled so please help me to redirect to http for URL
Thanks in advance Yugraj Rai
12 Replies
- MW_97676
Nimbostratus
If this is a response coming from the back end server you are load balancing you could apply a stream profile and use an irule to replace the URL:
when HTTP_RESPONSE {
STREAM::expression {@https://www.abc.com/404.php@http://www.abc.com/404.php@} Enable the stream filter for this response only STREAM::enable } else { Disable the stream filter by default STREAM::disable }}
- MW_97676
Nimbostratus
Sorry missed some of the irule when HTTP_RESPONSE { Check if response type is text if {[HTTP::header value Content-Type] contains "text/"}{ STREAM::expression {@https://www.abc.com/404.php@http://www.abc.com/404.php@} Enable the stream filter for this response only STREAM::enable } else { Disable the stream filter by default STREAM::disable } }
- MW1
Cirrus
If this is a response coming from the back end server you are load balancing you could apply a stream profile and use an irule to replace the URL:
when HTTP_RESPONSE {
STREAM::expression {@https://www.abc.com/404.php@http://www.abc.com/404.php@} Enable the stream filter for this response only STREAM::enable } else { Disable the stream filter by default STREAM::disable }}
- MW1
Cirrus
Sorry missed some of the irule when HTTP_RESPONSE { Check if response type is text if {[HTTP::header value Content-Type] contains "text/"}{ STREAM::expression {@https://www.abc.com/404.php@http://www.abc.com/404.php@} Enable the stream filter for this response only STREAM::enable } else { Disable the stream filter by default STREAM::disable } }
- Cory_50405
Noctilucent
If you are running v11.4.0 or later, it may be better to do this without iRules in local traffic policy. If not yet running v11.4.0 or higher, use this iRule and apply to your port 443 virtual server (assuming you have a separate virtual server for 80 and 443. If not, create separate ones):
when HTTP_REQUEST { HTTP::redirect http://[getfield [HTTP::host] ":" 1][HTTP::uri] } - yugraj_rai_1230
Nimbostratus
HI All
Currently we are using "BIG-IP 10.2.1 Build 511.0 Hotfix HF3" version. when i create Irule and associated with my virtual server it throw an error like "010703943:3: STREAM::expression in rule(abc) requires an associated STREAM profile on the virtual serever (Virtual server Name)
Thanks Yugraj Rai
- nitass
Employee
when i create Irule and associated with my virtual server it throw an error like "010703943:3: STREAM::expression in rule(abc) requires an associated STREAM profile on the virtual serever (Virtual server Name)
just assign default stream profile to the virtual server.
- MW1
Cirrus
agreed has to be applied before the irule, on the main properties tab of the virtual server (think you have to use the drop down to view the advanced settings)
- nitass_89166
Noctilucent
when i create Irule and associated with my virtual server it throw an error like "010703943:3: STREAM::expression in rule(abc) requires an associated STREAM profile on the virtual serever (Virtual server Name)
just assign default stream profile to the virtual server.
- MW1
Cirrus
agreed has to be applied before the irule, on the main properties tab of the virtual server (think you have to use the drop down to view the advanced settings)
- yugraj_rai_1230
Nimbostratus
Hi All Finally issue has been resolved as i created one virtual server listen on 443 port and use Irule provided by Cory. Thanks a lot for the support.
Thanks Yugraj Rai
- Cory_50405
Noctilucent
Glad to hear.
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