【发布时间】:2015-10-07 00:09:05
【问题描述】:
这是我第一次尝试将一些项目放在网络服务器上。我真的不知道如何设置 Zend Framework 项目的 .htaccess 文件。
我有这个结构:
/webroot
/ZendProject
/application
/docs
/library
/public
/css
/images
/js
.htaccess
index.php
/tests
/include
这是我的默认 .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]
感谢您的帮助
【问题讨论】:
-
有什么问题?你想做什么 ?问题是什么?
-
我需要向公共文件夹中的 index.php 发送任何请求
-
那你有什么问题?您当前的
.htaccess应该可以完成这项工作。 -
如果我尝试
www.webhost.it,它不会重定向到 index.php,但我会收到错误 403
标签: php apache .htaccess mod-rewrite zend-framework