修改 apache2 下的
# pico /etc/apache2/mods-available/rewrite.load
搜尋並將以下兩行,如果有# 的話,把前面的注解「#」拿掉
#AddModule mod_rewrite.c
# pico /etc/apache2/apache2.conf
加入
# pico /etc/apache2/sites-available/default
找到 gallery3 的 虛擬網站設定,在
<Directory /path/gallery3/>.............
AllowOverride All <---- 改成這樣
#AllowOverride None <---- 原來的
</Directory>
再先執行這個指令使系統讓指令啟用
a2enmod rewrite 再重新啟動 apache2 service apache2 restart