Skip to content
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

Redirect adds / to the url #36

Open
ghost opened this issue Jun 9, 2022 · 3 comments
Open

Redirect adds / to the url #36

ghost opened this issue Jun 9, 2022 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 9, 2022

I want to redirect to my.app/de but the redirect app redirects to my.app/de/, which is a broken link

I'm on YH 4.3.6.3 (stable) and Redirect 1.0.1~ynh1

@zamentur
Copy link
Contributor

This PR might fix your issue (depending the mode you select during the setup of the redirection) #37

@tomdereub
Copy link

tomdereub commented Jan 12, 2024

Is there a workaround ? Maybe modifying the nginx conf ? I have this in /etc/nginx/conf.d/domain.tld.d/redirect__3.conf :

location / {
  return 301 https://otherdomain.truc/machin$request_uri;
}

And it redirects to https://otherdomain.truc/machin/ which is broken link...

Edit : found a workaround that seems to work :

location / {
  return 302 https://otherdomain.truc/machin;
}

Then sudo /etc/init.d/nginx reload and it's done.

@MadMan247
Copy link

MadMan247 commented Jul 8, 2024

I had a similar issue when installing this application recently, but the extra / was in a different location; instead of redirecting to https://otherdomain.truc/my/page.html, it would redirect to https://otherdomain.truc//my/page.html, which ultimately worked as intended, but was ugly. My solution also required modifying the nginx config.

location / {
  return 302 https://otherdomain.truc/$request_uri;
}

the issue for me was the forward slash between the domain and the $request_uri. After fixing it, a new install for a different domain was performed, and the issue was not experienced this time. Why was the result inconsistent? Are the helpers performing these jobs inconsistent?

EDIT: Just updated my redirects (I have 5.) at least one broke*. The one that had the above "extra slash" issue once again had the extra slash. The one that didn't have that issue still didn't have the issue. Strange.

*Uninstalling + reinstalling fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants