如何在zend框架中部署时设置baseurl

时间:2014-01-22 09:33:39

标签: zend-framework base-url

这是我的网址 https://abc.com/project/projectfolder/public/

显示404未找到错误 有两个.htacess一个在公共文件夹下,另一个在项目文件夹下 现在请让我知道该怎么做

这是.htacess

选项+ FollowSymLinks选项-MultiViews

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond
%{REQUEST_FILENAME} -d RewriteRule ^.*$ – [NC,L] RewriteRule ^.*$/index.php [NC,L]

2 个答案:

答案 0 :(得分:0)

省略最后一条规则中的前导斜杠:

RewriteRule ^.*$ index.php [NC,L]

答案 1 :(得分:0)

使用以下内容,

RewriteEngine On
RewriteBase / 
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php