共享主机上的 zend 项目?

发布于 2024-12-20 11:25:07 字数 1020 浏览 1 评论 0原文

我在 ubuntu 操作系统上的 localhost 上创建了一个 zend 项目,它在我的本地系统上完美运行。现在我想把这个项目上传到网上。我购买了域名和托管。我得到以下目录结构来上传文件。

/www.example.com/web/content/

因此 www.example.com 指向 /www.example.com/web/content/ 文件夹。该目录结构是不可更改的。我将所有 public 文件夹文件放入 /www.example.com/web/content/applicationlibrarytests 文件夹放入 /www.example.com/web/。所以它与我的本地系统是同一目录,但只有公共文件夹被重命名为内容文件夹。

现在主页已成功显示,但每当我单击任何链接或重定向到任何其他网页时,都会出现以下错误。

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

有什么想法吗?

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长不大的小祸害 2024-12-27 11:25:07

发生内部服务器 (HTTP 500) 错误的原因有很多。您应该检查网络服务器的错误日志以获取更多详细信息。如果您无权访问虚拟主机的错误日志,请要求您的主机查看出了什么问题。

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.

々眼睛长脚气 2024-12-27 11:25:07

阅读以下线程后解决了这个问题:

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

所以它正在使用以下.htaccess

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

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文