Saturday, January 10, 2009

Enabling Rewrite Rules in apache or xampp

I installed xampp apache server recently. After using this for a while i wanted to make a rewrite rule which couldn't get set due to the default behavior of xampp which is rewrite_module not loaded.



So to enable it, goto your httpd conf file, add the following line
LoadModule rewrite_module modules/mod_rewrite.so
grep for the AllowOverride None which should be changed to AllOverride all.



Now before your rewrite rule have the folling lines
RewriteEngine on
Options +FollowSymLinks




Also sometimes you might end up getting 403 forbidden error. To solve this check for
line which is followed by
Order deny,allow
allow from None

which should be changed to the following
Order allow,deny
allow from all


Happy xampping



No comments: