ApacheRewrite 开启方法

2026-04-26 08:34:31

1、首先要先找到apache的配置文件然后打开,find / -name httpd 查找一下http在什么地方,我的安装目录 aldata/server下面

ApacheRewrite 开启方法

2、cd  httpd   进去vi    httpd.conf编辑apache 配置文件

ApacheRewrite 开启方法

3、在配置文件搜索mod_rewrite.so 把前面的# 去掉

ApacheRewrite 开启方法

4、然后在文件中搜索AllowOverride None修改成AllowOverride All

ApacheRewrite 开启方法

5、退出保存,然后重启apache,.htaccess就可以使用了。

ApacheRewrite 开启方法

6、就可以在.htaccess上写Url重启或者是301跳转。

ApacheRewrite 开启方法

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢