Apache 开启 mod-rewrite 模块

刚装了个 WordPress, 好像固定链接出错了, 找了下文章谢了个 phpinfo 检验了下发现没有找到这个模组.
phpinfo 的文件内容.

<?php

phpinfo();
?>
又找了下怎么安装这个东西, 看到命令行就可以打开, 那就更简单了, 输入一下命令.

$sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart

然后重启 Apache 服务, 再刷新 phpinfo 网页就看到这个模组已经工作了.

Leave a Reply

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注