Forum Discussion
2 Replies
Sort By
- Jad_Tabbara__J1Cirrostratus
Hello 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]" } }
- Jad_Tabbara__J1Cirrostratus
Hello Chenco,
You should modify your condition to
if { ([string tolower [HTTP::path]] starts_with "/page1/") && ([string tolower [HTTP::host]] equals "www.example.com") }
Regards