【发布时间】:2011-08-16 19:10:25
【问题描述】:
我想将所有请求重定向到我的index.php 脚本,这样http://mysite/ 之后的所有内容都将作为url-argument 传递给index.php。例如,http://mysite/moo.css 应变为 http://mysite/index.php/moo.css,http://moosite/moo/foo/bar/ 应变为 http://index.php/moosite/moo/foo/bar/。
简单吧?
但不是RedirectMatch (.*) index.php/$1,也不是RewriteRule ^(.*)$ index.php/$1 [R,L](或其他类似的正则表达式;RewriteEngine on 被没有省略;mod_rewrite 和mod_alias 已打开)生效。
发生了什么事?
【问题讨论】:
-
发布整个内容——你的 htaccess 中还有什么?
-
@cwallenpoole,什么都没有 =)
标签: php apache mod-rewrite redirect mod-alias