HMVC - renaming module through routes |
[eluser]Unknown[/eluser]
Hi Everyone, I have a module named 'modulemanager' but rather than having my client typing that long name, i want them to type adm. Now I figure that if I simply change my module name to 'adm', all issues will be resolved but I want to be able to share, add/import modules with other friends/developers and then simply change it's access using routes, rather than renaming the folder. Here's what I have so far. /config/routes.php Code: $route['^(?!'.MODULE_LIST.').*'] = "lazyload/$0"; /modules/modulemanager/config/config.php Code: $config['index_page'] = ''; /.htaccess Code: RewriteEngine on The above allows me to access http://localhost/fishbone/adm but when try to access my login controller http://localhost/fishbone/index.php/adm/login I get a 404 error. If I change form action to the module's full name (http://localhost/fishbone/index.php/modulemanager/login) I actually get a error, showing that my login controller was accessible. I was hoping if someone can help me shed some light into my problem. I was wondering if I should simply rename my module or maybe you can see what my htaccess file is missing or what other config I am missing in my application for /adm/login to be accessable. Thanks. Ps. Just one more note, the main reason why I want to change their name via routes is let's say there are two modules with a similar name, modulemanager and module-manager or simple-module-manager, no matter which one I use or which one I try, I want to control their access through my route definition. |
Messages In This Thread |
HMVC - renaming module through routes - by El Forum - 12-10-2012, 01:20 PM
|