如何设置zendFramework应用程序公用文件夹

时间:2013-03-28 07:48:04

标签: php .htaccess zend-framework

我的网络服务器结构:

mysite.com/www/here goes zendFramework folders and files..

我想像这样制作我的网址

mysite.com

但是,不是这样的:

mysite.com/public/

那么如何使它成为最佳方式?,使用.htaccess重定向?

1 个答案:

答案 0 :(得分:1)

阅读这篇文章:http://akrabat.com/zend-framework/zend-framework-on-a-shared-host/

在根文件夹中的index.php中:

<?php 
define('RUNNING_FROM_ROOT', true);
include 'public/index.php';

在根文件夹中的.htaccess文件中:

SetEnv APPLICATION_ENV production

RewriteEngine On
RewriteRule .* index.php