CodeIgniter Forums

Full Version: directory and controller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good day.
I have empty directory in '/temp' and controller '/application/controllers/Temp.php'.

If i open link 'mysite.com/temp' i does'n see echo from Temp.php. I see file from directory '/temp'.

And question, why is it? And where in codeigniter core this situation described.


Thank you!
Most likely your web-server (apache, NGINX...) does it. It trying open real path and if real path not exists passes request to index.php of CodeIgniter.

See you web-server configuration.

Also by default CodeIgniter routing opens Controllers by this mask: example.com/index.php/controller/method -> your-site.com/temp/view
It boils down to do not use system or CodeIgniter RESERVED Words.