Redirect - Toolkit / and header on 1 & 1 Hosting not working

i have been coding a tiny 1, 2 pager subscription script with the toolkit only, while everything was working perfectly on my local webserver, when delivering the result to my customer, it seemed to have problems with redirection on a 1&1 hosting

when testing said script on live server i debugged and noticed that redirection of any sort did not seem to work.

<?php
// i tried all the following
go('somewhere');
redirect::to('somewhere');
header('Location: somewhere');
exit;
?>

so the script ran and it seemed like it was trying to redirect somewhere but it always sort of refreshed the currently active site (seen in the url field) and stayed a white/blank page

in the end i couldn’t figure out what the problem was and replaced the redirection with the content (in this case a success submission page) inline.

any ideas what could break redirection? or server configuration wise if there’s a certain requirement.

Have you already upgraded to Kirby 2.5.9? It improves the compatibility with poor hosting providers such as 1&1 regarding redirects and URL handling in general.

i think i did, i loaded toolkit via composer on thursday i think, so if the update has been released by then it would’ve been the newest version

You can verify your Toolkit version in lib/toolkit.php.

Please also test if redirection works if you upload a simple PHP file with the following contents to the server:

<?php

header('Location: http://example.com');

This way we can check if the issue is related to Kirby or a general issue at 1&1.

Hi,
I have also a webhosting server on 1&1. All my go('somewhere') work fine.
You can see your Kirbyversion also at the panel > settings.

If you only use the Toolkit, there is no Panel. You can get the toolkit version with:

echo toolkit::version();

or find it in kirby/vendor/getkirby/toolkit/lib/toolkit.php.