|
|||
|
Next problem: Everything (and any experiment
) with the standard IndexController works fine. But: As soon as I just create a new controller, for example UserController in the same folder as IndexController, I get a simpleNot Found The requested URL /zend-playground/user/login was not found on this server. Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3 Server at localhost Port 80 What wrong this time? Unfortunatly the error seems to be too much standard to find out it's cause =| . Thanks in advance for your help and hints. Sebastian |
|
||||
|
We need more info.
If you could supply the url you requested, your controller source and routes you have setup...
__________________
Zend Framework Resources: Zend Webinars | Reference Manual | API Docs | Books | FreeNode: #zftalk Getting Started Tutorials: Getting started with ZF | Getting started with Zend Auth |
|
|||
|
yeah i know him ask, and my ask too.
for default : http://localhost/index/action is the the deafult controller. first i want to rename default controller as the http://localhost/myindex/myaction and add another http://localhost/myanotherpage/myanotherdo |
|
|||
|
So in my .htaccess is exactly the default:
RewriteEngine on RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php The content of UserController.php is simply: Code:
<?php
class UserController extends Zend_Controller_Action {
public function indexAction()
{
}
public function loginAction()
{
}
}
|
|
|||
|
No further ideas? Maybe the question has to be: When for example /user/login does not work, although a controller UserController extends Zend_Controller_Action exists in the controllers path, why then does it work with /index/news through a controller IndexController located and build based on the same schema as the user controller? I'm a bit confused and at a loss.
|
|
|||
|
Ewok, your are absolutly right. I forgot, that on my system rewrite isn't activated globally. I had to configure it for this concrete application. Now it works. Sometimes things are soo easy
. Thanks lot for your initial notion. |
|
|||
|
Hi,
I have a similar problem, that I've been banging my head on all day. I've new to ZF so I may be making a simple mistake. In my .htaccess I also have: Quote:
Zend_Controller_Front::run('../application/controllers') in index.php. My IndexController works, and I think that my RewriteRule is fine because http://myhost/mydir/index and http://myhost/mydir/index/index both work correctly, calling ../application/views/scripts/index/index.phtml and the indexAction() of IndexController respectively. Note: http://myhost/mydir is the base URL where .htaccess and index.php are. Now, If I call http://myhost/mydir/login, it does not call LoginController.php or ../application/views/scripts/login/login.phtml (as I would have hoped), I get an error in the browser: Quote:
thanks in advance. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|