码迷,mamicode.com
首页 > Web开发 > 详细

How to enable mod_rewrite on Apache?

时间:2016-04-19 14:01:58      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:

参考:http://www.ewhathow.com/2013/09/how-to-enable-mod_rewrite-on-apache/

Lets check if mod_rewrite exists as a module:
ls /etc/httpd/modules | grep mod_rewrite

Use the following command to check if mod_rewrite is loaded or enabled:
grep -i LoadModule /etc/httpd/conf/httpd.conf | grep rewrite

If you don’t see any of these, add the following line to your httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so

Type in the following command:
grep -i AllowOverride /etc/httpd/conf/httpd.conf
You need to replace None with All if it is not already All.
在/var/www/html目录下的 AllowOverride 改成 All 就ok了

How to enable mod_rewrite on Apache?

标签:

原文地址:http://www.cnblogs.com/qike/p/5407717.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!