Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can't seem to get RewriteRule to work on Windows 7. C:\www is the DocumentRoot.

<IfModule mod_rewrite.c>
   RewriteRule ^(.*)% "C:/www/main/index.php"

The goal is to take every incoming URL and go to index.php, but this doesn't appear to be doing anything. What am I doing wrong?

share|improve this question
Did you load it? Enable the logging with RewriteLog and RewriteLogLevel to see what it says. –  quanta Aug 5 '11 at 13:44
Is the ending regex pattern really a '%' on windows, or is that a typo? In Linux it's '$'. Other than that, you could probably get rid of the ^ and %, if you really want all URLS to redirect. –  DTest Aug 5 '11 at 14:07
% are a typo, they should be $...that was the problem. facepalm –  Peter Aug 5 '11 at 14:14

1 Answer 1

Make sure you realize that $ is end of pattern and not %

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.