We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Making actual controllers accessible

Development and Programming

jeff.o.taylor's avatar
jeff.o.taylor
2 posts
14 years ago
jeff.o.taylor's avatar jeff.o.taylor

I have discovered elsewhere in the forum how to hack index.php in the root directory to make normal CI style controllers accessible through the url (BASE_URL/controller_name/method_name) by commenting lines 97-99.

I have 2 concerns with this:

1) What can I expect to be broken with these 3 lines removed? As far as I can tell, the routes file is ACTUALLY used if you comment them, so basically if there is a match to a controller/method it will go there, else it will look for a match in template-group/template, else it’ll throw a 404. Are there any issues that I’m missing here?

2) I’d like to have this functionality without actually changing anything inside of index.php to avoid potential problems in the future if/when we upgrade EE. The best I can come up with is to write a EE_Router and overwrite the _set_overrides() method to not actually set any overrides. Though, this seems inelegant (and that’s putting it nicely) - is there a more reasonable way to approach this?

Thanks in advance for any help/comments!

edit - figured out what I was doing wrong with MY_Router thing, doh! Rest of the questions are still relevant.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.