Home >Backend Development >PHP Tutorial > zend framework URL中怎么去掉public

zend framework URL中怎么去掉public

WBOY
WBOYOriginal
2016-06-13 13:42:13864browse

zend framework URL中如何去掉public
虚拟空间,不能设置虚拟机,在网上查到有修改rewrite规则的办法,但是修改后php中的baseUrl()获取的路径也会发生变化,导致css,js等引用失败,有什么简单的解决办法吗?大家帮忙。
还有一点,请求css等元素时不通过rewrite规则吗?

------解决方案--------------------
我们都是把public直接设成root的

如果你现在要改,可以用alias(apache)或者soft link(filesystem),将public指向自身(public),
这样css等现有路径应该还是可以工作.

设置css/js不通过rewrite也可以, 如果后缀都是css/js的话, 具体看你的rule怎么写的

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn