那最新版本的Apache2.4.7如何開啟rewrite偽靜態呢!和之前的版本有一定差別,通過使用命令來來開啟,和大家分享下,避免踩坑
第一步:先執行加載rewrite模塊
sudo?a2enmod?rewrite
第二步:修改Apache2.conf
sudo?vi?/etc/apache2/apache2.conf
尋找到一下代碼:
Options?Indexes?FollowSymLinks
AllowOverride?None
Require?all?granted
改成
Options?Indexes?FollowSymLinks
AllowOverride?All
Require?all?granted
第三步:重啟apache2
sudo service apache2 restart