Page 1 of 1

zf create controller About - getting a 404 - why?

Posted: Fri Jun 07, 2013 9:43 pm
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 ?

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

Posted: Fri Jun 07, 2013 9:49 pm
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?

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

Posted: Fri Jun 07, 2013 9:56 pm
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

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

Posted: Fri Jun 07, 2013 10:00 pm
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

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

Posted: Fri Jun 07, 2013 10:20 pm
by minos_mks
thankx requinix ,
i found the problem in my httpd.conf
AllowOverride

thank you so much 4 your help