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

Routing problem /sth-abc->App:sth/foo (ok) and /sth/abc->App:sth/foo (nok) #799

Closed
nowackipawel opened this issue Oct 28, 2017 · 1 comment

Comments

@nowackipawel
Copy link
Contributor

nowackipawel commented Oct 28, 2017

I tried to use normal strings instead of parameters ($1) in controller calling.
$routes->get('/sth-abc', 'App::sth/foo', ['subdomain'=>'']);
$routes->get('/sth/abc', 'App::sth/foo', ['subdomain'=>'']);

In the case route is defined as: '/sth-abc', everything works as expected - www.host.com/sth-abc shows page returned by App::sth with foo as first parameter. In the second case when route is '/sth/abc' www.host.com/sth/abc returns 404.

I'm not sure if it is bug, because there is no example like this in docs but it can be a useful feature.

@lonnieezell
Copy link
Member

I thought we had fixed it, but there might be a bug still in the routing that doesn't like have a leading slash in the "from" portion of the route. Try rewriting that more like this:

$routes->get('sth/abc', 'App::sth/foo', ['subdomain'=>'']);

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