本地如何启用 mod_rewrite 重写模块
在 Apache 中启用 mod_rewrite 重写模块,需要按照以下步骤操作:
- 打开 Apache 的配置文件 httpd.conf,找到以下配置项:
#LoadModule rewrite_module modules/mod_rewrite.so
-
去掉该配置项前面的注释符号“#”,使其生效,并保存文件。
-
重启 Apache 服务,使配置生效。
在 Linux 系统中,可以使用以下命令重启 Apache 服务:
sudo systemctl restart httpd
在 Windows 系统中,可以使用以下命令重启 Apache 服务:
net stop Apache2.4
net start Apache2.4
完成上述步骤后,就成功启用了 mod_rewrite 重写模块。
原文地址: http://www.cveoy.top/t/topic/bmAQ 著作权归作者所有。请勿转载和采集!