Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP header() redirect in Google App Engine

I try to make a header redirect on an Google App engine instance with

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://".$location);
header("Connection: close");
die();

It's working on my local development environment. On Google App Engine I receive the 301 but it doesn't redirect to the new location, instead there's a white screen.

like image 941
Stephan Avatar asked Nov 20 '25 14:11

Stephan


1 Answers

It was a encoding problem. I had to urlencode() all parts of $location. On my local MAMP environment there was no problem.

like image 104
Stephan Avatar answered Nov 23 '25 05:11

Stephan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!