Question: why use htaccess file in codeigniter?
Answer: htaccess file in your project's root directory or CodeIgniter directory( not in the application directory). A . htaccess file allows us to modify our rewrite rules without accessing server configuration files.