Route not Found 404 error |
Hi @all
I have defined routes in config/routes.php shown below $route['test'] = "login/index"; .htaccess file included DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] but whenever I request http://example.com/test it through 404 excepion. can you please tell me why it's happened.. Thanks
@peterparker,
Please don't forget to either tell us what version of CI that you are using or post it in the specific versions threads. Thx
http://example.com/index.php/test works I take it?
https://codeigniter.com/userguide3/gener...x-php-file Are you sure your server are configured to load your .htaccess file? It does start with a .? How does your filename and classname look like?
(08-19-2020, 01:08 PM)php_rocs Wrote: @peterparker,yes .htaccess file is active
Please try to keep everything simple and clean. Use this default route file, I have added a few examples in it and don't include htaccess in it
PHP Code: <?php Then please use this htaccess, don't forget to rename it to : .htaccess : PHP Code: RewriteEngine On These are the classical, the cleanest way. Please try them first, then we should go on |
Welcome Guest, Not a member yet? Register Sign In |