Why does CodeIgniter understand a route as a directory and break the links?

0

I have created a system in CI that uses the template schema, with header, navmenu, template (component) and footer.

For stylization I use Foundation.

The problem is this: when accessing a simple route, such as home, I have no errors, but when accessing a route as user / new the page loses the reference, since links to css, js, and images , which are relative link, are pointing to a subdirectory of user / because the system thinks it is inside this directory, but it does not exist, it is just a controller.

This does not happen with the controllers' default methods, just when I try to access another method through the controller / method combination in the url.

Does anyone know this error and how to fix it?

    
asked by anonymous 18.06.2016 / 04:02

1 answer

0

Are you using the helper url? If yes, you are also using base_url (); if not, base_url it generates all the way of your project, just needing you to list precisely the folder and name the file you want to access.

And you removed the index.php by htaccess?

    
18.06.2016 / 04:58