Dave_Pisarek
Nov 14, 2021Cirrus
Root domain redirect that ignores uris
I have an interesting ask and I am guessing this has been asked before but not finding an answer. A customer wants to protect a root domain page by not allowing clients to connect to it but does not want to effect traffic to the uris.
Example:
Redirect traffic to jobs.com to hired.com.
Allow traffic to jobs.com/search or jobs.com/rehired, they have thousands of uris so can't just specify the uris in the rule.
Doing a simple equals redirects all uris to the hired.com.
when HTTP_REQUEST {
if {[HTTP::host] eq "jobs.com"} {
HTTP::redirect "https://hired.com"
}
}
How can we specify to allow anything after the jobs.com/* to be allowed but redirect the root?