ChatGPT - Redirect PHP function: URL conditions