Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Zend framework 服务器中的zend框架部署_Zend Framework_.htaccess_Deployment - Fatal编程技术网

Zend framework 服务器中的zend框架部署

Zend framework 服务器中的zend框架部署,zend-framework,.htaccess,deployment,Zend Framework,.htaccess,Deployment,我有一个服务器,在那里我上传了我在zend框架中的工作(在一个子域中)。文件夹名为“访问” 因此,当我转到:,它显示一个目录结构: Parent Directory application/ docs/ library/ nbproject/ public/ tests/ 但是当我转到:,我会得到我的项目的索引页 但我想在键入以下内容时获取索引页: 您能给我所需的正确htaccess吗?您可以使用以下规则集来执行此操作,该规则集是部分修改版本的 .htaccess文件位于/访问: Rewrit

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

因此,当我转到:,它显示一个目录结构:

Parent Directory
application/
docs/
library/
nbproject/
public/
tests/
但是当我转到:,我会得到我的项目的索引页

但我想在键入以下内容时获取索引页:


您能给我所需的正确htaccess吗?

您可以使用以下规则集来执行此操作,该规则集是部分修改版本的

.htaccess文件位于/访问:

RewriteEngine on

# Guard against people visiting /public/ directly
RewriteCond %{THE_REQUEST} ^[A-Z]\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]

此外,这些在共享主机中部署的其他方法也有助于:

特别是,一位教授让我在一份报告中更详细地写了这篇文章