RewriteRule not working...
View Single Post
01-24-2010, 08:55 PM
Join Date: Jan 2010
perhaps you can try this... I hope this can help you.
Agus Pang (
open file xampp/apache/conf/httpd.conf
find AllowOverride None
change into AllowOverride All
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule rewrite_module modules/mod_rewrite.so
I faced a hair-tearing problem. mod_rewrite was loaded and yet it was not working in .htaccess files (and httpd.conf initially). Here is the solution along with how you can debug mod_rewrite problems.
Add these two line to your httpd.conf immediately after RewriteEngine On.
After that I added the required RewriteRule etc.
The reason for testing directly in httpd.conf is to ensure that mod_rewrite is working in the first place. After some debugging I realized my expression was wrong. So now I found mod_rewrite was working in httpd.conf. However it still wasn't working in .htaccess files.
I found AllowOverride was set to None in httpd.conf. I changed it to All (after all I am the only user of the machine). And it finally started working everywhere (after a restart).
What I learnt:
Unmanaged dedicated web hosting is really really painful, unless you are (or have) a good linux system administrator. Too many things to setup and too many points of failure. And I haven't even started working on serious hardening stuff.
View Public Profile
Send a private message to aguspc1
Find More Posts by aguspc1