2008-07-03, 04:35 AM
Hello, this tutorial will teach you how to enable mod_rewrite for Friendly URLS to work.
This tutorial uses SSH, and preferable as root.
Step 1 - Add the rewrite.load to /etc/apache2/mods-enabled/
To do so, enter the following command
Step 2 - Edit Apache Configuration for virtualhosting.
To do so, you must edit this file. Enter the following command.
Now make adjustments wherever you see DocumentRoot pointing to your www or public_html directory and change AlloweOverride to all.
For example, this how it looks on mine. (Bold = edited)
Those were the sections in that file that had the directory pointing to public_html. It might be www for you.
Save the file.
Step 3 - Restart Apache
And that's it! Hopefully you won't run into problems. Enjoy
This tutorial uses SSH, and preferable as root.
Step 1 - Add the rewrite.load to /etc/apache2/mods-enabled/
To do so, enter the following command
ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
Step 2 - Edit Apache Configuration for virtualhosting.
To do so, you must edit this file. Enter the following command.
pico /etc/apache2/sites-enabled/000-default
Now make adjustments wherever you see DocumentRoot pointing to your www or public_html directory and change AlloweOverride to all.
For example, this how it looks on mine. (Bold = edited)
<VirtualHost *>
ServerAdmin webmaster@localhost
DocumentRoot /home/**/aaspforum.com/[i]public_html[/i]
<Directory />
Options FollowSymLinks
AllowOverride [b]all[/b]
</Directory>
<Directory /home/**/aaspforum.com/[i]public_html/[/i]>
Options Indexes FollowSymLinks MultiViews
AllowOverride [b]all[/b]
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
# RedirectMatch ^/$ /apache2-default/
</Directory>
Those were the sections in that file that had the directory pointing to public_html. It might be www for you.
Save the file.
Step 3 - Restart Apache
/etc/init.d/apache2 restart
And that's it! Hopefully you won't run into problems. Enjoy