CodeIgniter - route - Error 404 |
Hello,
I have a "routing" problem on CodeIgniter 4.2.7. My home page is displayed well, the page also reloads well when I click on "home" in my menu, on this side there is no problem, however when I want to access another page I have the message error following "Error 404". Here is my controller: Code: class c_accueil extends BaseController Here is my base url: Code: public $baseURL = 'http://localhost:63342/ProjetWeb'; Here is my route: Code: $routes->get('/', 'c_accueil::index'); Here is my view (v_menu) : Code: <?=anchor(base_url().'/public/', 'Accueil')?> So "Accueil" works fine but not "espaceNintendo" Url of my home page which works well: http://localhost:63342/ProjetWeb/public/ However, the URL as soon as I click on "Espace nintendo" is this: http://localhost:63342/ProjetWeb/public/espaceNintendo But it gives me "error 404". Do you have any idea where the problem comes from? My helpers are well loaded on my base_controller: Code: protected $helpers = ['html', 'form', 'url']; I tried many things but none solved my problem
You need to know about Base URL, URI path and route.
See https://codeigniter4.github.io/CodeIgnit...-structure Your baseURL is http://localhost:63342/ProjetWeb/public/. |
Welcome Guest, Not a member yet? Register Sign In |