I am writing a module that should run code as early as possible because it's a conditional redirect to another page, so the first page doesn't need to finish loading.
I only want to run it on /foo/*
.
Is there a hook that can be bound to a particular path, like hook_form_alter()
can be with form IDs? Or should I just use hook_init()
?
foo
an alias or an internal path? – Andy Jul 25 '14 at 10:16