My codeigniter application directory structure is like
–application
–htdocs
–index.php
–.htaccess
–folder
–file1.xml
Now I have a url http://mysite.com/folder. This is showing the files list in the folder directory. What I want here is to rewrite this url to a controller on my site say ‘html.php’.
Note: I do not want to redirect. I want the url to be same but instead of showing folder contents, I want to pass the control to a controller. What .htaccess rule should I write?
have you looked at url routing?
ie
$route[‘folder’] = “html”; //html is your controller
http://www.yoursite.com/folder
will “redirect” to yoursite.com/html but won’t change the URL.
no need to mess with htaccess
edit:
obtained from – http://codeigniter.com/forums/viewthread/153228/
perhaps this is what you are after?