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

Mixing host and URI path strategies #47

Open
glen-84 opened this issue Dec 7, 2013 · 1 comment
Open

Mixing host and URI path strategies #47

glen-84 opened this issue Dec 7, 2013 · 1 comment

Comments

@glen-84
Copy link

glen-84 commented Dec 7, 2013

Is it possible to not alter the URI path if a host is matched?

f.e. If you have the following domains:

domain.com
domain.de

I need two things:

  1. Don't add "/de/" to domain.de (as the locale is based on the TLD)
  2. Any non-de locales on domain.de should redirect to domain.com/locale

I think that there needs to be some way of indicating the "primary" domain when using the URI path strategy. The path segment will then only be added if you're on that primary domain (.com in this case).

@juriansluiman
Copy link
Collaborator

I think this is the best implemented as "filters". Just thinking out loud, but you might want to have a callback which can be used to check during detect/found/assemble which returns true or false depending on your specific situation.

In that case, you could attach a filter callback to the uri uri path (found) which returns false when the domain is domain.de. In that case, the /de is not prepended to the path. What are your thoughts?

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

No branches or pull requests

2 participants