Forum Discussion

Dave_Pisarek's avatar
Nov 14, 2021

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.




Redirect traffic to to

Allow traffic to or, they have thousands of uris so can't just specify the uris in the rule.


Doing a simple equals redirects all uris to the



  if {[HTTP::host] eq ""} {

    HTTP::redirect ""




How can we specify to allow anything after the* to be allowed but redirect the root?


1 Reply

  • Yes, this has been answered many times. You can use something like below.

    when HTTP_REQUEST {
       if {[HTTP::uri] equals "/"} {
            HTTP::respond 301 Location ""

    Please note, this would need modification if you have any further custom requirement.