繁体   English   中英

.htaccess mod_alias 和 mod_rewrite 重定向被忽略

[英].htaccess mod_alias and mod_rewrite redirects are ignored

我想将所有请求重定向到我的index.php脚本,这样在http://mysite/之后的所有内容都将作为 url-ar 传递给index.php For example, http://mysite/moo.css should become http://mysite/index.php/moo.css and http://moosite/moo/foo/bar/ should become http://index.php/moosite/moo/foo/bar/ .

容易吧?

但不是RedirectMatch (.*) index.php/$1 ,也不是RewriteRule ^(.*)$ index.php/$1 [R,L] (或其他类似的正则表达式;省略RewriteEngine onmod_rewritemod_alias已打开) 生效。

这是怎么回事?

在不知道更多信息的情况下,我的猜测是该目录缺少Allowoverride指令。 (队长风格回答明显,但还是容易被忽视)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM