Forum Discussion
Simple iRule for URL appending?
- ArieAltostratusDid the request contain a query string?
- nitassEmployeeBanyan,
[root@iris:Active] css b virtual bar list bvirtual bar { snat automap pool foo destination 172.28.17.33:http ip protocol tcp rules myrule profiles { http {} tcp {} } } [root@iris:Active] css b rule myrule list rule myrule { when HTTP_REQUEST { set val [HTTP::uri] log local0. "\[HTTP::uri\] is $val" log local0. "\[string length $val\] is [string length $val]" if { ([string length $val] == 0) or ([string length $val] == 1)} { HTTP::redirect https://[HTTP::host]/apath } } } [root@iris:Active] css curl -I http://172.28.17.33/ HTTP/1.0 302 Found Location: https://172.28.17.33/apath Server: BigIP Connection: Keep-Alive Content-Length: 0 [root@iris:Active] css cat /var/log/ltm Nov 2 20:38:32 local/tmm info tmm[1609]: Rule myrule : [HTTP::uri] is / Nov 2 20:38:32 local/tmm info tmm[1609]: Rule myrule : [string length /] is 1
- Sanjit_126167NimbostratusI have box in pool member node on http://xyz.com/test. I want to irule hide internal /test and redirect to only http://xyz.com. Please help me
- Sanjit_126167NimbostratusI have box in pool member node on http://xyz.com/test. I want to irule hide internal /test and redirect to only http://xyz.com. Please help me
- Kevin_StewartEmployeeThere are a few considerations to your request:
when HTTP_REQUEST { HTTP::uri "/test[HTTP::uri]" }
Hi please help for Https request, what changes be there in this irule--
when HTTP_REQUEST { if { [HTTP::path] equals "/" } { HTTP::redirect "/somewhere/else.html" } }
for http request its working fine, but for https its not aking this irule...i changes http to https everywhere in irule...
- Thomas_Gobet_91Cirrostratus
Hi,
With https you don't need to change anything on this iRule.
- Thanks very much Thomas Gobet....:)
- Thomas_GobetNimbostratus
Hi,
With https you don't need to change anything on this iRule.
- Thanks very much Thomas Gobet....:)
- ArieAltostratus
@Arun, assuming that you're using separate VIPs for HTTP and HTTPS, can you confirm that the iRule has been assigned to both VIPs?
The rule as you included it above should not require any adjustments for HTTPS.
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