404 can't find route |
The reason you are getting a 404 error when loading another page than the homepage is because your .htaccess file is not configured correctly.
To fix this, you need to add the following lines to your .htaccess file: RewriteEngine On RewriteBase /agb/project-root/public/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,NC,QSA] This will tell Apache to rewrite all requests to the index.php file, which will then handle the routing. Once you have added these lines to your .htaccess file, save the file and reload your browser. You should now be able to load all of your pages without any errors. Additional notes: Make sure that your .htaccess file is located in the /agb/project-root/public/ directory. If you are using a different web server, such as Nginx, you will need to configure it to rewrite requests to the index.php file. If you are using CodeIgniter, you may need to add the following line to your config/config.php file: $config['index_page'] = ''; This will tell CodeIgniter to use the index.php file for routing. I hope this helps! |
Messages In This Thread |
404 can't find route - by risk - 09-14-2023, 02:52 AM
RE: 404 can't find route - by kenjis - 09-14-2023, 05:54 PM
RE: 404 can't find route - by InsiteFX - 09-14-2023, 08:49 PM
RE: 404 can't find route - by kenjis - 09-14-2023, 10:04 PM
RE: 404 can't find route - by risk - 09-14-2023, 11:42 PM
RE: 404 can't find route - by VerayaTanaysa - 10-16-2023, 11:37 PM
RE: 404 can't find route - by kenjis - 10-17-2023, 01:21 AM
|