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 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 www.domain.com/index.php, but not for www.domain.com/dl/oksoks/index.php 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 domain.com folders. What am I missing here?

share|improve this question
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.