-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing redirects #30
base: master
Are you sure you want to change the base?
Fixing redirects #30
Conversation
The redirects where broken as there where multiple csurl parameters pasted together with '?' in the given location. This was causing "too many redirects" errors. (The $_SERVER['REQUEST_URI'] variable contains the exact uri that was called, including the query_parameters) In this solution the csurl parameter gets replaced.
Assuming the called address is
Current version: fixed version: |
I think you just introduce a new bug. The following code should work: $server_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$response_header = 'Location: ' . $server_path . '?csurl=' . $value;
|
This is quite a long time ago, but i think the point is that nothing needs to be replaced if there is no I can say that at some point we decided to fork this repo here: https://github.com/KlausBenndorf/guide4you-proxy |
does your version retain other query parameters? |
The redirects were broken as there were multiple csurl parameters pasted together with '?' in the given location. This was causing "too many redirects" errors. (The $_SERVER['REQUEST_URI'] variable contains the exact uri that was called, including the query_parameters)
In this solution the csurl parameter gets replaced.