Stumped. Controller function not being executed? |
[eluser]nchmura[/eluser]
I have been staring at this all morning and it is killing me. First off though, I am loving CI. I am currently working on another project using Zend and I hate going back to it ![]() So here is my situation: I am having a problem where I can load up a controller and view just fine only as long as it is the default function (index) in the controller. For example, if I try: http://mysite.com/home (or just http://mysite.com/) - it executes just fine. If I throw in a controller function like this: http://mysite.com/home/test I get a CI "404 Page Not Found" error. My controller looks like this (stripped it down to nothing troubleshoot): Code: class Home extends Controller { Unsurprisingly so, my log file looks like this: Quote:DEBUG - 2009-01-17 09:11:09 --> Config Class Initialized I am on developing on Dreamhost and did follow this dreamhost htaccess wiki article. Last tidbit, my route def cont is set to this: $route['default_controller'] = "home"; To me this is telling me some sort of htaccess problem, I have tried all sorts of things, but I get nothing but bupkis. Any ideas? Thanks.
[eluser]Sarfaraz Momin[/eluser]
Did you try having the index.php in your URL just to check if that works. In case it works then there is a sure problem with your .htaccess file. I do not have any dreamhost hosting so I can just work around to see if some options work.
[eluser]nchmura[/eluser]
Ahhh, just did that and it works... Thanks. So it is the whole htaccess shebang. Well that was frustrating ![]() I am not 100% concerned on getting it running index.php-less here, when development is done it is moving to a different host - which in theory it should be just a matter of an htaccess file and editing the config. Right? Though if anyone has any suggestions about it working here I would be happy to hear them! Thanks again.
[eluser]meridimus[/eluser]
There are some things you should change for dreamhost support, I gave up though but it was something like adding a question mark on the end. This was mine but it caused errors somewhere, I can't remember. Give it a go to find out. Code: RewriteEngine on
[eluser]nchmura[/eluser]
[quote author="meridimus" date="1232240958"]There are some things you should change for dreamhost support, I gave up though but it was something like adding a question mark on the end. This was mine but it caused errors somewhere, I can't remember. Give it a go to find out. Code: RewriteEngine on Yup, I tried that one too, though with all the little tweaks and whatnot I was trying, it might have been something else. I will give that try again when I am feeling up to it! Thanks. |
Welcome Guest, Not a member yet? Register Sign In |