Forum Discussion

tdix_303592's avatar
tdix_303592
Icon for Nimbostratus rankNimbostratus
Dec 19, 2016

Access /* from /foo/*.

Have an application sitting at / on server. I am looking for a rule to direct all traffic from "example.com/foo" to server/.

 

1 Reply

  • You can send a redirect:

    when HTTP_REQUEST {
    if { ([HTTP::host] eq "example.com") and ([HTTP::uri] starts_with "/foo/") } {
    HTTP::respond 301 Location "http://[HTTP::host]/"
    }
    }
    

    If you are trying to mask the URI, see this link.