gumara

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

เปิด mod rewrite

Submitted by gumara on Sat, 05/10/2008 - 09:27

วิธีเปิด 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

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

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.

More information about formatting options

rMilk

Comment

Tags

Another ~


Let's chat

User login

del.icio.us/~

Add to Technorati Favorites


Stat:

free web tracker