您好,欢迎访问一九零五行业门户网

apache停的一个rewrite

apache下的一个rewrite
1:我的是zend环境,默认下除了一些静态资源都映射到index.php了
2:我有一个新的映射notice.html 想映射到content/index ,然后让content/index 再映射到index.php
我该怎么写呢?
rewriteengine on
rewriterule notice\.htm$ content/index [nc,l]
rewriterule !\.(gif|css|js|jpg|png|pdf|ico|html|php|swf|wmv)$ index.php [nc,l]
我发现这个规则是直接notice.html 映射到了index.php
而不是content/index 映射到了index.php
分享到:
------解决方案--------------------
你是不是需要在notice.html文件夹下再建立一个.htacess文件。
如果在notice.html文件夹下没有建立的话,程序还是会走public下的.htacess.
具体原理的东西,你可以看看传智播客php视频教程 zend framework 第4讲 zend原理深度剖析。
其它类似信息

推荐信息