Kin
Kin

Reputation: 4596

How routing is done in codeigniter?

I could not find the .htaccess file in CodeIgniter framework and i'm wondering how do they do route without it? Or it is somewhere hidden?

Upvotes: 0

Views: 49

Answers (1)

some12die4
some12die4

Reputation: 100

There is no .htaccess by default provided with codeigniter. They serve it through the index.php. .htaccess is only used to direct the urls to the index.php. This way codeigniter is working in environments where rewriting isn't allowed. Another way of getting controller and function is by query strings. Anyway the actual routing is done in system/core/Router.php so you can read the code. Since Codeigniter is open source application that can't be hidden.

Upvotes: 1

Related Questions