2

I have make one site using Zend Framework.

Its working fine in development server but not working in Live server.

I am getting error "The requested URL /public/default was not found on this server."

Index page is running fine.

For example :

http://www.xyz.com/public (Its working fine)

But

When I am trying to run http://www.xyz.com/public/default or http://www.xyz.com/public/admin.

I am getting the error "The requested URL /public/default was not found on this server."

Thanks in advance.

Kanji

2
  • you are aware of the fact that public should be the entry point, right? your directory '/var/www/zend/application/public' should be the document root for the domain Commented Nov 12, 2010 at 11:42
  • Yes I am aware of this fact. But my default and admin is not working. Commented Nov 12, 2010 at 11:45

3 Answers 3

3

Do you have a .htaccess file in the public folder with the next content:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Sign up to request clarification or add additional context in comments.

2 Comments

Yes i have the same content in .htaccess file in the public folder
Thanks it helped me, amd fixed my issues.
3

First fast answer: is mod rewrite enabled? (many times not in shared hosting schemes)

Also try to access the controller's action with urls like this:

/index.php/controller/action

which in your case should be: /index.php/public/default

to see that everything is in place.

2 Comments

i still guess it has something to do with mod rewrite, use of vhost/htaccess and the fact that public is not the root
Can you please give me any example how to set that htaccess file?
1

I found the solution.

go to your Apache configuration file (httpd.conf, /etc/apache2/sites-availble/site.conf, or /usr/local/zend/apache2/conf/extra/httpd-vhosts.conf, etc.) and locate the ... tag which controls the virtual server for this site.

Make sure you have set:

AllowOveride All

Restarted Apache.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.