.htaccess文件无法正常工作在Ubuntu 14.04使用的Apache2 [英] .htaccess file not working on Ubuntu 14.04 with apache2
本文介绍了.htaccess文件无法正常工作在Ubuntu 14.04使用的Apache2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的.htaccess文件并不在我的Ubuntu 14.04与Apache 2
工作
这是我的文件:
My .htaccess file doesn't work on my Ubuntu 14.04 with Apache 2.
This is my file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?pg=$1
我如何解决我的问题?
How do i solve my problem?
推荐答案
从您的信息,我只能猜测(不工作是不是很具体)。
最大的可能是您没有启用mod_rewrite的。式中:
From your information I can only guess ("doesn't work" isn't very specific).
Most probably you did not enable mod_rewrite. Type in:
a2enmod重写
和后重新启动Apache:
and restart Apache after:
服务的Apache2重启
这篇关于.htaccess文件无法正常工作在Ubuntu 14.04使用的Apache2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文