Hey,
I’m a newbie to CodeIgniter but I’ve been reading the documentation and have a few questions about how routing works, particularly with relation to duplicate content.
1. Is it possible to prevent the default controller from being accessed directly? For instance, if the default controller is welcome, is it possible to keep http://example.com/welcome/index and http://example.com/welcome/some_other_method from being accessible directly like that?
2. On a related note, is it possible to choose a canonical URL for content when using the default method? For example, is it possible to have http://example.com/controller/index redirect to http://example.com/controller
3. If I use rewriting to remove index.php from the URLs, can I safely switch the URI protocol to REQUEST_URI so that people can’t access content using URLs with index.php in them? Will that even work, or does the URI protocol config option only affect generated URLs?
4. How can I deal with the issue of trailing slashes in URLs (eg: http://example.com/controller/method/id versus http://example.com/controller/method/id/)?
5. A slightly unrelated routing question. Is it possible to turn off/override CodeIgniter’s default routing entirely? The URIs I’m envisioning for a project I’m working on don’t really fit with the controller/method/parameters model that CodeIgniter uses, and while I can use custom routing, I would prefer to disable any alternate paths that shouldn’t be used.
Thanks in advance!