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

Adding root URL with slug / does not work and is not deleteable #663

Closed
Empty2k12 opened this issue Feb 23, 2020 · 6 comments · Fixed by #676
Closed

Adding root URL with slug / does not work and is not deleteable #663

Empty2k12 opened this issue Feb 23, 2020 · 6 comments · Fixed by #676
Labels
Milestone

Comments

@Empty2k12
Copy link

Summary

Adding a new short URL with custom slug as / works, shlink displays this URL as domain.tld in the list. However the root URL does not resolve (https://domain.tld gives the 404 page) and the short URL cannot be deleted with the message: Something went wrong while deleting the URL :(

How Shlink is set-up

Docker: https://hub.docker.com/layers/shlinkio/shlink/stable/images/sha256-7a50dd4401dd366f9636c3fa146d9de82d3a918fb6d03807fa0a7a445582e8b6?context=explore

How to reproduce

On https://app.shlink.io/:

  1. Add new short URL with these settings: Insert the URL to be shortened: https://gero.dev and Custom Slug: /
  2. Navigate to List short URLs
  3. See new short domain for root domain. Open that, it will 404. Try to delete it, it fails.
@Empty2k12 Empty2k12 added the bug label Feb 23, 2020
@acelaya
Copy link
Member

acelaya commented Feb 24, 2020

That shouldn't really be allowed. I will make sure that gets validated and a meaningful error is returned.

In order to configure a fallback redirect from your base domain, you have to pass the BASE_URL_REDIRECT_TO env var to the docker image.

You can find more information here https://github.com/shlinkio/shlink/tree/develop/docker#supported-env-vars

@acelaya acelaya added this to the 2.1.0 milestone Feb 24, 2020
@Empty2k12
Copy link
Author

I got the BASE_URL_REDIRECT_TO to work, thanks! I appreciate your work on the project and that the behavior will be fixed soon.

Maybe it can be allowed that the empty URL I have in my instance can be deleted, but new empty ones can't be created?

@acelaya
Copy link
Member

acelaya commented Feb 24, 2020

Yes, that's the plan. However, you can always manually delete that URL from the database, of you don't want to wait for the next release to be ready.

@acelaya
Copy link
Member

acelaya commented Mar 6, 2020

Hey @Empty2k12

I'm afraid I cannot make this URL to be deletable. You will have to manually remove it from the database if it bothers you to see it there.

@Empty2k12
Copy link
Author

@acelaya I appreciate your fix for this! I already deleted the URL so everything is fine. Thanks for your work, the product is excellent!

@acelaya
Copy link
Member

acelaya commented Mar 7, 2020

Thanks for the kind words 🙂

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

Successfully merging a pull request may close this issue.

2 participants