Welcome Guest, Not a member yet? Register   Sign In
[Error 404] Routing vs htaccess
#1

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
RewriteBase /codeigniter/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

$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';
$route['(:any)'] = 'reports/$1';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;



I have tried to view the page source but could't figured it out.
Code:
<li class="nav-item active">
     <a class="nav-link" href="http://monitor.vbu.fr/codeigniter/">LOGCATCHER</a>
</li>
<li class="nav-item ">
     <a class="nav-link" href="http://monitor.vbu.fr/codeigniter/flowmetercatcher">FLOWMETERCATCHER</a>
</li>

Can someone tell me what i am missing please ?

Thank you in advance.

Best regards, ash
Reply


Messages In This Thread
[Error 404] Routing vs htaccess - by ash - 05-29-2018, 08:16 AM
RE: [Error 404] Routing vs htaccess - by php_rocs - 05-29-2018, 12:44 PM
RE: [Error 404] Routing vs htaccess - by ash - 05-30-2018, 02:30 AM
RE: [Error 404] Routing vs htaccess - by InsiteFX - 05-29-2018, 03:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB