Zend的resources.frontController.baseUrl不`吨工作 [英] zend resources.frontController.baseUrl don`t work
问题描述
我要放一zend的项目在我的根服务器的子目录。我想在我的项目:http://blog.com/site并没有在http://blog.com。 试图做到这一点,I`ve补充文件: /application/configs/application.ini 线下:
I need to put one zend project in a subdirectory of my root server. I want my project in: "http://blog.com/site" and not in "http://blog.com". Trying to do it, I`ve added in file: /application/configs/application.ini the line below:
resources.frontController.baseUrl =http://blog.com/site
但是当我进入http://blog.com/site它返回此错误:
指定无效的控制器(网站)
resources.frontController.baseUrl = "http://blog.com/site"
but when I access "http://blog.com/site" it returns this error:
Invalid controller specified (site)
如果我把引导线下:
$fc = Zend_Controller_Front::getInstance();
echo $fc->getBaseUrl();
它写的http://blog.com/site
我该怎么办了subdiretory/网站不考虑控制器?因为我想把它当作URL的一部分。
How can I do the subdiretory "/site" do not be consider a controller? because I want it as a part of url.
推荐答案
添加的RewriteBase到你的.htaccess
Add RewriteBase to your .htaccess
<IfModule mod_rewrite.c>
RewriteBase /site
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
这篇关于Zend的resources.frontController.baseUrl不`吨工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!