My code tried to redirect the user based on the appname=x parameter in the url, which has now been removed as only one parameter is possible, i.e. the code works like this:
$appName="dev" //variable still set because it's used a lot
if($appName!=null){
//write to log file
if($appName="dev"){
echo "<script>console.log('test successful');</script>";
header('Location: '. 'https://dev.company.com'); //doesn't matter which address I put here
else{
echo "<script>console.log('not the dev');</script>";
}
}
Interestingly, while I keep the line 'header()' commented, the echos log to the console just fine. As soon as any header('Location: ....) is in there, I'm getting a 500 Internal Server Error. This happens no matter to which page I set the function to go.
For security reasons I can't print the entire error, but it basically looks like this:
Where the individual params are highlighted.
What is even weirder is that the callback.php's first line is a console.log. In this case, this is never reached while the header() runs. I'm failing to see what I'm doing wrong here. Any ideas?