Apache Rewrite 的小问题,在线等

efanlx 2010-01-26 03:01:20
我想将 http://www.a.com/plus/user/name/ 重写成 http://name.a.com 的二级域名

Apache Rewrite 该如何写???
...全文
64 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kevinsh 2010-01-27
  • 打赏
  • 举报
回复
楼主,我有个类似的问题。期待中。
感觉你解决了下面的问题:
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
efanlx 2010-01-27
  • 打赏
  • 举报
回复
顶上去,还没有解决,高手帮帮忙呀

24,922

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧