在服务器中的Zend框架部署

我有一个服务器,在那里我已经上传我的工作在zend框架(在一个子域)。 该文件夹的名称是“访问”。

所以,当我去http://mysitename.com/visit时 ,它显示了一个目录结构:

Parent Directory application/ docs/ library/ nbproject/ public/ tests/ 

但是当我去: http : //mysitename.com/visit/public ,我得到我的项目的索引页。

但是当我input: http : //mysitename.com/visit时,我想获得我的索引页面

你能给我正确的htaccess它需要吗?

另外,这些在共享主机中部署的其他方法可以帮助:

特别是, tharkun的回答让我在一篇博客文章中更详细地写出来。

您可以使用以下规则集来完成此操作,该规则集部分是文档中描述的部分修改版本。

.htaccess文件在/访问:

 RewriteEngine on # Guard against people visiting /public/ directly RewriteCond %{THE_REQUEST} ^[AZ]\s/visit/public/ RewriteRule ^public/(.*)$ /visit/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d # Make sure we've rewritten to the ./public/ directory already RewriteCond $0 ^public/ RewriteRule ^.*$ - [NC,L] # The index file is now at /visit/public/index.php RewriteRule ^.*$ /visit/public/index.php [NC,L]