I need my controller to be name “directory” so I can have urls for my business directory page like "mysite.com/directory".
But the problem is that “directory” is a predefined php class, so I cannot declare it again. It gives error
Fatal error: Cannot redeclare class
Directory in
C:\wamp\www\Logistica\system\application\controllers\directory.php
on line 8
Is there a way I can rename my class and controller to something else and still have the “directory” in URL ?
Take a look at CodeIgniter routing
In your case you’ll want a route like: