duanaoyuan7202 2011-08-16 19:10
浏览 72
已采纳

.htaccess mod_alias和mod_rewrite重定向被忽略

I want to redirect all requests to my index.php script in such a way that everything that goes after http://mysite/ would passed to index.php as url-argument. 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/.

Easy, huh?

But not RedirectMatch (.*) index.php/$1, nor RewriteRule ^(.*)$ index.php/$1 [R,L] (or others regexp like that; RewriteEngine on was not ommitted; mod_rewrite and mod_alias are turned on) took effect.

What's going on?

  • 写回答

1条回答 默认 最新

  • douke9379 2011-08-16 19:13
    关注

    Without knowing anything more, my guess would be that the Allowoverride directive is missing for that directory. (Captain obvious style answer, but still easy to overlook).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统