Thank you! If I did that there are +100 pages to call the function. Is there a way to do an exception instead?
Ah, yes that’s true.
Im sure someone has a much smarter solution than me, but you could add something that checks if a variable exists.
So wrap your global code inside the “if statement” and on the pages where you don’t want the redirect to happen you set this variable to true, in this case the “notAllowedToRedirect” variable.
This variables has to be set inside the head (and not before the </body) so the variable is set before the function call in the global custom code.