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

Allow set default convention endpoints behavior #8

Open
picodotdev opened this issue Mar 3, 2019 · 0 comments
Open

Allow set default convention endpoints behavior #8

picodotdev opened this issue Mar 3, 2019 · 0 comments

Comments

@picodotdev
Copy link
Contributor

picodotdev commented Mar 3, 2019

Currently a page with a route have two URLs, Tapestry convention and route assigned URLs.

@Route("/{0}/event/{1}")
public class Event {
}

For this example Event page has two URLs:

  • Convention: /event/seo-friendly-slug/42
  • Route: /seo-friendly-slug/event/42

This may be not the desired in a website for not have duplicated content. Also if some time later a page is assigned a route the convention URL may be desired to be updated with a redirect or a not found status code.

This issue is for allow to configure de behavior of the Tapestry convention URL when a page has a route. Possible values can be:

  • Default: same page with two URLs, current behavior.
  • Redirect: when convention URL is requested a redirect is returned to route URL.
  • Not Found: when convention URL is requested a HTTP 404 error is returned.
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

1 participant