mod_rewrite not working
Posted: Wed Sep 06, 2006 7:51 am
I'm running Windows XP and Apache 2.0.something. To enable mod_rewrite, I uncommented the following line and restarted the server:
phpinfo() does display mod_rewrite in loaded Apache module list. I have created a test folder inside /htdocs and put .htaccess there:
This rule should display the contents of bar.htm when foo.htm (http://localhost/test/foo.htm) is requested (which does not exist physically). However, I get 404 so it seems the mod_rewrite rule didn't work.
Why is that so?
Code: Select all
#LoadModule rewrite_module modules/mod_rewrite.soCode: Select all
RewriteEngine on
RewriteRule ^foo\.htm$ /bar.htm [L]Why is that so?