zf create controller About - getting a 404 - why?

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Post Reply
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

zf create controller About - getting a 404 - why?

Post by minos_mks »

I am still new in Zend framework and i just installed it and i am gating the reguler blue page (welcome page)
and i used the: zf create controller test
and zend created the folders and the files exactly
If I then go to: http://copticz2/test/

I got a 404 error.

and my .htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

can somebody help ?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: zf create controller About - getting a 404 - why?

Post by requinix »

If /test/ is a real directory, you have your .htaccess set up to not send requests for "/test/" to index.php. Apache will look for /test/index.htm, /test/index.html, and whatever other DirectoryIndex filenames it has set up, and if none of those exist it'll 404.

Maybe that -d in the third RewriteCond should be a -f?
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: zf create controller About - getting a 404 - why?

Post by minos_mks »

i trayed it now and it didn't work

i am trying to follow that video
http://www.youtube.com/watch?feature=pl ... OwSfKXKpZQ
step by step and if you go to the min 3:00 you will see he just created the controller and went to the page with no changes
i don't know what should i do
Thank you so much for your fast respond
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: zf create controller About - getting a 404 - why?

Post by minos_mks »

and i don't have test as folder. after i run the zf create controller test
zend creat a TestController.php file in the controllers folders but there is no folder called Test
minos_mks
Forum Commoner
Posts: 69
Joined: Thu Feb 04, 2010 1:58 am

Re: zf create controller About - getting a 404 - why?

Post by minos_mks »

thankx requinix ,
i found the problem in my httpd.conf
AllowOverride

thank you so much 4 your help
Post Reply