Hi to all,
I want to test mod_rewrite in my debian box. I have browsed through the net but still not able to make mod_rewrite to work. Below are the steps that I have followed:
---
1. I have enabled mod_rewrite module in Apache2 using a2enmod command.
2. I have created a file "www.mine.org" in /etc/apache2/sites-available with the following entries:
###
<VirtualHost *>
ServerName
www.mine.org
DocumentRoot /var/www/mine
ServerAdmin
mine@mine.org
ErrorLog /var/log/apache2/www.mine.org-error_log
CustomLog /var/log/apache2/www.mine.org-access_log common
DirectoryIndex index.php
<Directory />
Order Deny,Allow
Allow from all
# Don't show indexes for directories
Options Indexes FollowSymLinks MultiViews
RewriteEngine On
RewriteRule ^/articles/([0-9]+)$ /?article=$1 [PT]
</Directory>
</VirtualHost>
###
3. I have enabled the site through the a2ensite command.
4. I have also have this entry in /etc/hosts:
###
127.0.0.1 localhost.localdomain localhost
www.mine.org
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
###
---
I have entered "http://www.mine.org/articles/6" in my browser, I still got a 404 not found error
I'm stumped on what to do next. Please help.
Thanks in advance.