Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have simple rewrite rules as I just learned about them

RewriteEngine On
RewriteRule ^dl/(.*)/.*$ dl/$1/index.php [L]
RewriteRule ^index.php$ upload.js [L]

both are working on Windows for url localhost/upload/dl/mkdji/index.php, but on Debian works only second rule for url, but not for After dl is some random string. Obviously I'm missing something regarding directory depth, but don't know what. file htacces is in localhost/upload and root of folders. What am I missing here?

share|improve this question
up vote 2 down vote accepted

Probably you need the RewriteBase directive. For example:

RewriteBase /
share|improve this answer
now it's working on debian, but not windows. those two are neverending source of confusion. – cikatomo Dec 13 '12 at 11:29

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.