Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Route Alias, Disable and Redirect

An idea I've been pondering over is expanding config level route control. Here's what I'm thinking of:

1) The url is checked against disabled routes. /admin = true If match is found, immediately 404.

2) If no matches, the url is checked against defined aliases. /mod = /admin If a match is found, replace the matched text and parse normally.

3) If no matches, url is checked against config redirects. /login = /user/login If match is found, replace the matched text and 301 (302?) to the new URL.

These settings could be stored in the /config folder in a routes.php file or something. A prominent use case would be a pseudo renaming of apps without worrying about having to refactor every reference of the app names.

Thoughts?

Comments

Sign In or Register to comment.