安装

必须在 Apache 服务器上使用之前启用 mod_rewrite。

于 Debian / Ubuntu

跑 a2enmod rewrite

然后用 service apache2 restart 重启 Apache

一般情况

在静态配置文件中添加或取消注释以下行(例如 httpd.conf):

LoadModule rewrite_module modules/mod_rewrite.so

然后重启 Apache。