-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added ability to redirect user from subdomain to some predefined url. #3
Conversation
array('subdomain.example.com'), | ||
array('multi.subdomain.example.com'), | ||
array('v.e.r.y.m.u.l.t.i.s.u.b.d.o.m.a.i.n.example.com'), | ||
array('subdomain.example-is.com'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail if I add 'localhost' to this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I think example.co.uk won't work also. I have to rethink a bit. It's not that easy to know if domain contains subdomain. One possible solution would be, that you would need to specify used domain in config. Than it's quite easy. What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I was thinking something similar as well. I think it'd be best to have a list of patterns to match against the host and then only redirect matching hosts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe for starters we could just use this parameter router.request_context.host
to know which is the main domain.
Added ability to redirect user from subdomain to some predefined url.
No description provided.