mod_rewrite on XP

Problems with the Windows version of XAMPP, questions, comments, and anything related.

mod_rewrite on XP

Postby schizoman » 14. April 2009 18:50

Okay, what am I doing wrong? I'm running XAMPP on Windows XP, and am trying to get mod_rewrite to work. In httpd.conf, I uncommented the appropriate LoadModule, and moved it to directly above the mod_cache line:

LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule cache_module modules/mod_cache.so

I changed every AllowOverride to All:

AllowOverride All


Then, at the bottom, I placed the following two lines:

RewriteEngine on
RewriteRule ^test1.html$ test2.html

I restarted apache. (I even tried rebooting Windows.) At first, both test1.html and test2.html were in the test directory. Going to test1.html showed the contents of test1.html. If I delete test1.html, I get a 404 error.

phpinfo() shows mod_rewrite as active.

Can anyone help? Thanks.
"Virtual reality" is redundant.
schizoman
 
Posts: 1
Joined: 15. September 2007 11:37
Location: Florida

Re: mod_rewrite on XP

Postby Wiedmann » 14. April 2009 19:11

In httpd.conf, I uncommented the appropriate LoadModule,

That's all you must do.

Code: Select all
RewriteRule ^test1.html$ test2.html

Can anyone help?

Your rule can't match if used in httpd.conf main context.

(Inside a Directory tag or a .htaccess file this rule can match)
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 28 guests