redirect_ynh
redirect_ynh copied to clipboard
Can't redirect from `https://mydomain.tld/a_redirect_name` to `https://myotherdomain.tld/`
Describe the bug
Found breaking change: Can't redirect from https://mydomain.tld/a_redirect_name
to https://myotherdomain.tld/
and this behavior worked before PR #27. Now the redirection is opening https://myotherdomain.tld/a_redirect_name
Context
- Hardware: not relevant
- YunoHost version: 4.3.6.2 (not relevant)
- I have access to my server: Through SSH and through the webadmin
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
- Using, or trying to install package version/branch: master
- If upgrading, current package version: no
Steps to reproduce
- Install a redirect app from webadmin or from yunohost command with:
- domain:
mydomain.tld
- path:
/a_redirect_name
- redirect_path:
https://myotherdomain.tld/
- redirect_type:
public_302
- domain:
Expected behavior
When opening https://mydomain.tld/a_redirect_name
in a browser, the redirection should be done on redirect path https://myotherdomain.tld/
(like before PR #27)
Proposal
The behavior described in PR #27 (and so the solution) should be activated thanks a new options when the redirect app is installed or by adding choices in option redirect_type
This pr should fix that: https://github.com/YunoHost-Apps/redirect_ynh/pull/37
I can confirm that this is still a relevant issue; installing on a subdomain subpath e.g. installing on www.example.com/redirect configured to redirect to example.com results in redirecting to the URL example.com/redirect. This will only allow access to folders that are in the path containing /redirect on the destination URL. If this is intended, that is fine, however the explanation when installing is insufficient.