Can't 'go home' when using URL prefix #18

Closed
Tatsh opened this Issue Sep 2, 2011 · 0 comments

Projects

None yet

1 participant

@Tatsh
Moor::enableRestlessURLs();
Moor::setUrlPrefix('/');
Moor::setNotFoundCallback('NotFoundController::notFoundCallback');
Moor::route('', 'mycustomcallback');

Now 2 regex's get created for matching:

#^/0$#
#^/1$#

The first one fails, but going to /1 works. Obviously neither of these are solutions. All my other routes work fine. Using nginx rule:

rewrite ^.*$ /index.php;

I think a better solution when $url_prefix == pattern is to use a place-holder string like '<front>' (Drupal uses this to denote links to front page). This way it's clear we are matching 'nothing' and just want a front page handler.

@Tatsh Tatsh closed this Mar 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment