Setting up mod_rewrite in Ubuntu
มีเพื่อนมาให้ช่วยดู blog คณะวิทยาลัยการจัดการ จันทรเกษมทำไมลง WordPress MU แล้ว user เปิดไม่ได้ หาสาเหตุได้ซักพักเลยรู้ว่า mod_rewrite ใช้งานไม่ได้เลยขอ ssh มาเข้าไปดเชตแป๊บเดียวก็ใช้งานได้ปกติครับ ดูวิธีการแก้ไขง่ายๆดังนี้
Step1 คำสั่งในการใช้งาน
a2enmod rewrite /etc/init.d/apache2 restart cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/ nano /etc/apache2/sites-enabled/000-default
Step2 ทำการเปิดไฟล์ 000-default เพื่อทำการแก้ไขข้อมูลดังต่อไปนี้
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2’s
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
ดูที่ AllowOverride None ให้แก้เป็น AllowOverride All แล้วก็ทำการ restart apache เพียงเท่านี้ก็ใช้งานได้แล้วครับ
Popularity: 7% [?]
Blog Related Content
Upgrading to Ubuntu 8.04 LTSinstall MySQL server 4.1 on Ubuntu EdgyRequest a free CD UbuntuLinux: Backup Your Website AutomaticallyWebmin Installation in Debian and Ubuntu Linux

















ใช้ไม่ค่อยเป็นครับ แต่ปกติเวลา rewrite ผมก็ลอกจากคนอื่นเขามา