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

Routes #193

Open
Kr3m opened this issue Aug 18, 2022 · 2 comments
Open

Routes #193

Kr3m opened this issue Aug 18, 2022 · 2 comments

Comments

@Kr3m
Copy link

Kr3m commented Aug 18, 2022

My apologies in advance. I should've put this in discussion. Ugh.

I'm wondering what I can add to my routes so that the following code doesn't override the Bonfire routes:

$routes->get('(:any)', 'Servers::index/$1');

@Kr3m
Copy link
Author

Kr3m commented Aug 18, 2022

For now I've changed this to static code, but not sure if there is a workaround for this.

$routes->get('contact', 'Servers::index/contact');

@Zoly
Copy link

Zoly commented Jul 22, 2024

CodeIgniter Forums Archived Development & Programming - Excluding routes

Again, you must exclude any route that you do not want to be handled like categories:

$route['^(?!pages|assets).*'] = "/category/index/$0";

In this example, this $route entry will "disqualify" any URI route that begins with "pages" or "assets."

Also, please not that higher route entries take precedence over lower ones. From the manual:

Note: Routes will run in the order they are defined. Higher routes will always take precedence over lower ones.

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