Apache Rewrite 的小问题,在线等
我想将 http://www.a.com/plus/user/name/ 重写成 http://name.a.com 的二级域名
Apache Rewrite 该如何写???
楼主,我有个类似的问题。期待中。
感觉你解决了下面的问题:
http://www.a.com/plus/user/name/好像不用定位到/index.
网页结构:
SiteRoot
|—-Controller
|— index controller
|— main controller
|—-Template
|— index.tpl
|— main.tpl
|— index.php
|— index action
|— login action
|— logout action
|— main.php
|— index action
|— add action
|— delete action
|— list action
|— index.phtml
环境:
Apache+PHP+mysql+Smarty+ZF
在IE中Index能打开,login和Logout Action都能执行
,现在的问题是在index.phtml中href中写”/main”或则
“/main/add”无法跳转到main.html页面,请问应该如何
写ZF的router?如何配置apache的RewiteRule?
目前的RewriteRule是:
RewriteEngine ON
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
如果在ZF中添加Router,应该如何写?
谢谢 QQ:624286399