如何通过htaccess的子域访问公共文件夹中ZF2 [英] How to access public folder in zf2 by htaccess subdomain
本文介绍了如何通过htaccess的子域访问公共文件夹中ZF2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在ZF2新。请帮帮我。
我安装在 www.example.com/zend /
我的新的Zend项目目录
但它并没有直接调用。通过 www.example.com/zend/public
I am new in zf2. Please help me.
I setup my new zend project on www.example.com/zend/
directory
but it didn't call directly. Its call via www.example.com/zend/public
我如何才能获得直接 www.example.com/zend /
这个网址访问。我不想在虚拟主机中的任何变化。我只想要使用的.htaccess
文件。
How can i access directly access by www.example.com/zend/
this url. I don't want to any changes in virtual host. I want only use of .htaccess
file.
请给我建议的解决方案。
Kindly suggest me solution.
推荐答案
安装在 /的Zend /
目录中的htaccess文件:
Setup an htaccess file in your /zend/
directory:
RewriteEngine On
RewriteBase /zend/
RewriteRule ^(?!public/)(.*)$ public/$1 [L]
这篇关于如何通过htaccess的子域访问公共文件夹中ZF2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文