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

Allow querying redirections #212

Closed
e0ipso opened this Issue Nov 5, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@e0ipso
Member

e0ipso commented Nov 5, 2017

A decoupled site may want to be able to support redirections of old URLs in a given content page.

A suggested solution is to provide a custom endpoint that takes a URL and returns either:

  • a 404.
  • the current canonical URL for that.

That should query both the URL aliases and the redirect module.

@dawehner

This comment has been minimized.

Member

dawehner commented Nov 5, 2017

Isn't that exactly what the redirect module is doing? It uses entities, so everything is queryable

@e0ipso

This comment has been minimized.

Member

e0ipso commented Nov 5, 2017

My wish is to have that with URL aliases as well in the same resource.

@dawehner

This comment has been minimized.

Member

dawehner commented Nov 6, 2017

@e0ipso

This comment has been minimized.

Member

e0ipso commented Nov 6, 2017

That sounds interesting. Although I don't think I got it.

A simplified version of what I think it's most useful is that a query to https://cms.contentacms.io/api/redirects?filter[…]=/foo/bar returns { … "/node/75" … }. This endpoint will return exactly the same if /foo/bar is a redirect or a URL alias.

Is that what you're thinking too?

e0ipso added a commit that referenced this issue Nov 29, 2017

@e0ipso e0ipso closed this in #225 Nov 29, 2017

e0ipso added a commit that referenced this issue Nov 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment