阿帕奇不使用mod_rewrite.c [英] Apache not using mod_rewrite.c

查看:136
本文介绍了阿帕奇不使用mod_rewrite.c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

于是我就设置在Debian,apache等一个的Linode的服务器,现在我试图让我开发运行的应用程序,但它需要 mod_rewrite.c 。所以很自然,我去了应用程序的目录(恰好是在PHP如果该事项),并创建了一个与的.htaccess这里面的吧:

So I just setup a linode server with debian, apache, etc. and now I'm trying to get an app that I'm developing running, but it requires mod_rewrite.c. So naturally, I went to the directory of the application (happens to be in PHP if that matters) and created a .htaccess with this inside of it:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
</IfModule>

所以他们我领导交给我的域名, example.com/hello ,它给了我一个404错误,当它应该显示我的内容索引。 PHP的负荷。是否有任何理由 mod_rewrite.c 不会工作?

So they I headed over to my domain, example.com/hello, and it gave me a 404 error, when it should be showing me the content that index.php loads. Is there any reason why mod_rewrite.c wouldn't be working?

推荐答案

在启用了模块的/ etc / apache2的/启用MODS-?

Is the module enabled in /etc/apache2/mods-enabled?

这篇关于阿帕奇不使用mod_rewrite.c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆