[Error 404] Routing vs htaccess |
Hello all,
I am new to CI and this is my first application (project name: codeigniter). I have a single controller named : Reports which consists of 2 methods : public function index() => [I assumes this is the default and it redirects to view('pages/logcatcher')] public function flowmetercatcher() => [redirects to view('pages/flowmetercatcher')] I have already removed the index.php using my htaccess file Code: RewriteEngine On $config['base_url'] = 'http://monitor.vbu.fr/codeigniter'; When i acccess the above link, it works well but then i click the flowmetercatcher page, i get an 404 error. Here is my routes : Code: $route['default_controller'] = 'reports'; I have tried to view the page source but could't figured it out. Code: <li class="nav-item active"> Can someone tell me what i am missing please ? Thank you in advance. Best regards, ash
@ash,
I hate to assume but did you follow the instructions in the documentation ( https://codeigniter.com/user_guide/gener...x-php-file )? Also, does your apache server have mod_rewrite enabled?
Try replacing this.
PHP Code: $route['(:any)'] = 'reports/$1'; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(05-29-2018, 12:44 PM)php_rocs Wrote: @ash, Hello, Thank you for your reply. Indeed, the mod_rewrite was not enabled. But as i am hosting the application within an IIS server, i was able to activate it using the web plateform. https://manage.accuwebhosting.com/knowle...erver.html Thanks you very much. The issue is now solved. Best regards, ash |
Welcome Guest, Not a member yet? Register Sign In |