Mod_rewrite na Ubuntu

Zde si odložím návod jak rozjet mod_rewrite na distribuci Ubuntu.


1. Uděláme odkaz na rewrite mod

sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/

2. Editujeme soubor pro kořenový web (pro virtuální servery musíme editovat zvlášť)
sudo vim /etc/apache2/sites-enabled/000-default

3. Změníme AllowOverride na 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>

4. restartujeme Indiána..
/etc/init.d/apache2 restart

2 thoughts on “Mod_rewrite na Ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.