Now when i enter the url mydmain.com/index.php/admin it redirects to the admin module, If i omit the index.php and enter mydomain.com/admin it refers to the site module (the default module) instead.
Is there any reason why this would happen? Do i need to create a route? if i do then how?
Still doesn’t work. That property just sets if you want to return index.php in the createUrl and getbaseUrl methods. I didn’t see anything else it does.
Yea i know about the htaccess file and rewrite rules. And i them setup. The problem is that if i enter domain.com/index.php/moduleID/controllerID/actionID it works if i do the same without the index.php it doesn’t.
Just checked and it works fine under Apache 2.2.11 (Win32)
I simply created an empty web application and added an admin module, then I created the following .htaccess file under the same directory as my index.php:
When i enter just mydomain.com i get the indexcontroller of the default module which is site. When i enter mydomain.com/index.php/admin i get the index controller of the admin module. when i do mydomain.com/admin i get the index controller of the default module which is site again. and no i have no admin folders in the root directory nor in the subs.
Another thing i should mention by default the index.php that loads Yii and everything else resides inside Public/index.php
my htaccess file is inside the root folder where Public directory is under the same folder i have another file index.php that includes Public/index.php not sure if i need it though but wanted to point this out.
Ok, what I’d do is strip out the .htaccess and get the basics working then start adding things back line by line.
I have the advantage of knowing I can get the basics working, of course! Which doesn’t help you, unfortunately.
If it means starting a test project from scratch, then that’s what I’d do. If you are under version control – who isn’t? – then revert and branch; you can then cherry pick the fixes into master/trunk once you’ve found the glitch.