Forum Discussion
Actually using Oddah's sugggested code it actually does what I want it to. (Thanks!)
when HTTP_REQUEST { if { [HTTP::uri] contains "/svc/CCEUserMonitor.asp" } { HTTP::respond 301 Location "http://virtual server/svc/cceUserMonitor.asp" } }
If I want to add more contains "blah blah blah.blah" to this how would I code it like after .asp I want to add another if statement.
For example:
when HTTP_REQUEST { if { [HTTP::uri] contains "/svc/CCEUserMonitor.asp" } { HTTP::respond 301 Location "http://virtual server/svc/cceUserMonitor.asp" if { [HTTP::uri] contains "/svc/blahblahblah.asp" } { HTTP::respond 301 Location "http://virtual server/svc/cceUserMonitor.asp" } } }
Can I just add if statement after if statement? Sorry I just have zero programing experience.
Thanks guys!
- Vijay_EAug 31, 2016Cirrus
If you want to redirect anything that starts with /svc:
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/svc/" } { HTTP::respond 301 Location "http://virtual server/svc/cceUserMonitor.asp" } }