Hello, guys.
I' m facing a very confusing problem with my CI project. I've searched the internet and couldn't find anything useful.
The thing is the 404 error page.
I've created a custom 404 page and replaced it in "Routes" file..
I've also have two different types of controllers.. One for numeric values in url and the regular one for the pages..
Now as for the localhost:
If i access a url that contains numeric value and does not exist like, "localhost/example/123456", the 404 page that shows up is the one that's located under "application/views/errors/html/error_404.php"..
If i access a url that contains text like, "localhost/example/examplepage" and does not exist, the 404 page that shows up is my custom one.
As for the live server:
If i access a link that either contains text or numeric value i get the "application/views/errors/html/error_404.php" page and not my custom one BUT in numeric value url the page is shown css styled with "base_url()" working ok, but in text value url i get the following error:
My "routes" file:
Any ideas? What am i doing wrong on that?!
I' m facing a very confusing problem with my CI project. I've searched the internet and couldn't find anything useful.
The thing is the 404 error page.
I've created a custom 404 page and replaced it in "Routes" file..
I've also have two different types of controllers.. One for numeric values in url and the regular one for the pages..
Now as for the localhost:
If i access a url that contains numeric value and does not exist like, "localhost/example/123456", the 404 page that shows up is the one that's located under "application/views/errors/html/error_404.php"..
If i access a url that contains text like, "localhost/example/examplepage" and does not exist, the 404 page that shows up is my custom one.
As for the live server:
If i access a link that either contains text or numeric value i get the "application/views/errors/html/error_404.php" page and not my custom one BUT in numeric value url the page is shown css styled with "base_url()" working ok, but in text value url i get the following error:
Code:
Message: Call to undefined function base_url()
My "routes" file:
Code:
//Other routes
$route['(:num)'] = 'entries/index/$1';
$route['(:any)'] = 'pages/$1';
$route['default_controller'] = 'pages/index';
$route['404_override'] = 'c404';
$route['translate_uri_dashes'] = FALSE;
Any ideas? What am i doing wrong on that?!