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

route_to('name'); does not work for other subdomains #1697

Closed
nowackipawel opened this issue Jan 31, 2019 · 1 comment
Closed

route_to('name'); does not work for other subdomains #1697

nowackipawel opened this issue Jan 31, 2019 · 1 comment

Comments

@nowackipawel
Copy link
Contributor

nowackipawel commented Jan 31, 2019

I've got config like this:

$routes->get('i/(:any)', 	'App\Controllers\Site\CDoc::item/$1', 	['subdomain' => 'doc', 'as' => 'doc_item']);

and I'd like to use it in my project on all of subdomains (doc, dev, etc...) which are in my project.
It is working as far as it is called using route_to('doc_item','sth'); from doc.domain.com, but when I am trying to do this from dev.domain.com it does not work.

I think route_to should not filter possible values to one hostname/subdomain as Router do; that's why we could specify name of the route i.e. as=>doc_item. Many sites has many subdomains and use subdomains widely. IMHO no possibility for simple linking between subdomains is a strong limit.

@jim-parry jim-parry added this to the 4.0.0-beta.2 milestone Mar 5, 2019
@jim-parry
Copy link
Contributor

You explicitly provided for a subdomain restriction in your routing options, so it would be expected that the routing rule not apply to the other subdomains.
It sounds like what you are suggesting is already doable by not specifying the subdomain option, no?
What am I missing?

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

2 participants