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

Improve web redirection and 404 behavior. #726

Merged
merged 1 commit into from
May 23, 2015
Merged

Conversation

juliusv
Copy link
Member

@juliusv juliusv commented May 23, 2015

Previously we redirected any non-existent path to the root (or path
prefix).

The new behavior:

With no path prefix:

  • "" -> "/"
  • "/biz" -> 404

With path prefix of "/foo/bar":

  • "" -> "/foo/bar/"
  • "/" -> "/foo/bar/"
  • "/foo/bar" -> "/foo/bar/"
  • "/biz" -> /foo/bar/biz"
    (anything not starting with the path prefix gets the prefix prepended)
  • "/foo/bar/biz" -> 404

Previously we redirected any non-existent path to the root (or path
prefix).

The new behavior:

With no path prefix:

- "" -> "/"
- "/biz" -> 404

With path prefix of "/foo/bar":

- "" -> "/foo/bar/"
- "/" -> "/foo/bar/"
- "/foo/bar" -> "/foo/bar/"
- "/biz" -> /foo/bar/biz"
  (anything not starting with the path prefix gets the prefix prepended)
- "/foo/bar/biz" -> 404
@beorn7
Copy link
Member

beorn7 commented May 23, 2015

👍

juliusv added a commit that referenced this pull request May 23, 2015
Improve web redirection and 404 behavior.
@juliusv juliusv merged commit 837ffce into master May 23, 2015
@juliusv juliusv deleted the improve-redirections branch May 23, 2015 14:16
simonpasquier pushed a commit to simonpasquier/prometheus that referenced this pull request Oct 12, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants