Forum Discussion
Chenco_322726
Nimbostratus
Jun 01, 2017HTTPS to HTTP when having another Irule for HTTP to HTTPS
Hello ,
im trying to redirect make a redirect on a specific page to work without the https.
i've tried many of suggestions here/google and did not had luck yet .
i do have another rule for that doma...
Jad_Tabbara__J1
Cirrostratus
Jun 01, 2017Hello Chenco,
Add this irule to your HTTP VS
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] starts_with "/page1/" } {
do nothing only log to verify that it works properly
log local0. "[HTTP::path]"
} else {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
}
And add this irule to your HTTPs VS
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] starts_with "/page1/" } {
HTTP::redirect http://[getfield [HTTP::host] ":" 1][HTTP::uri]
} else {
do nothing only log to verify that it works properly
log local0. "[HTTP::path]"
}
}
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