gumara

เหนือกว่าเหตุผล ผมไม่มีเหตุผล

Rewite

เปิด mod rewrite

วิธีเปิด apache mod_rewrite บน hardy ครับผม

  1. เช็คก่อน ว่า mod ทำงานยัง
    สั่ง sudo a2enmod rewrite
  2. ถ้ายังไม่เปิด
    สั่ง sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
  3. แก้ไข Site enable
    สั่ง sudo vi /etc/apache2/sites-enabled/000-default
  4. ที่ AllowOverride none เปลี่ยนเป็น all
    <Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    allow from all
    # This directive allows us to have apache2's default start page
    # in /apache2-default/, but still have / go to the right place
    # Commented out for Ubuntu
    #RedirectMatch ^/$ /apache2-default/
    <Directory>
  5. Restart apache
    สั่ง sudo /etc/init.d/apache2 restart

เสร็จเรียบร้อย

Active forum topics

Comment

Tags

~


Let's chat

User login

del.icio.us/~

Add to Technorati Favorites


Stat:

free web tracker