zend project on shared hosting?

∥☆過路亽.° 提交于 2019-12-12 02:40:11

问题


I created a zend project on localhost on ubuntu OS and it is working perfectly on my local system. Now I want to upload this project online. I purchased domain name and hosting. I got following directory structure to upload files.

/www.example.com/web/content/

So www.example.com is pointing to /www.example.com/web/content/ folder. This directory structure is unchangeable. I put all public folder files to /www.example.com/web/content/ and application, library and tests folders into /www.example.com/web/. So it is the same directory as my local system but only public folder is renamed to content folder.

Now homepage is successfully shown but whenver I click any link or redirect to any other webpage, I got following error.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2 Server at example.com Port 80

Any idea ?

Thanks


回答1:


Internal server (HTTP 500) errors can occur for many reasons. You should check your web server's error log for more details. If you don't have access to your vhosts' error log, ask your host to see what's going wrong.




回答2:


It is solved after reading following thread:

http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/problems-1and1-hosting-560.html

So it is working using following .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


来源:https://stackoverflow.com/questions/8441133/zend-project-on-shared-hosting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!