Load controller with hyphen or underline in the URL - Codeigniter

Asked

Viewed 241 times

0

I hosted my project done in Codeigniter 3 on a server using Linux and PHP 7 and I cannot load certain links, gives error 404.

Example of Controller Name: Relatorio_Detalhado.php

Link in the url:

http://127.0.0.1/projeto/index.php/relatorio-detalhado/index ou 
http://127.0.0.1/projeto/index.php/relatorio_detalhado/index

Note: The local project on my machine works normally, now when I play in hosting, returns me error 404.

  • What version of codeigniter local? And PHP?

  • As this is the name of the Detailed Report.php class ?

  • Have you ever tried to name the controller as Relatorio_detalhado, with the d minuscule?

  • Thank you all, I just renamed the controller to Detailed Report and it worked, valeuu!

1 answer

2


Change the file name to Report_dphp.

just like in class

class Relatorio_detalhado extends CI_Controller

Browser other questions tagged

You are not signed in. Login or sign up in order to post.