Hi, it seems like I've found a bug in mod_rewrite's behavior (per-dir). Ruleset in .htaccess: rewriteengine on rewriterule ^(.*)$ $1 rewriterule ^(.*)$ redir.html?$1 [L] From rewrite_log: rewrite 'abc/def' -> 'abc/def' rewrite 'abc/def/def' -> 'redir.html?abc/def/def' As shown above - mod_rewrite has corrupted URL (rewritten by 1st rule) by adding unexpected '/def' to it. It happens almost in every case when a request ('abc/def' in example above) is big enough (contains more than one or two directories). I've tested it with Apache 2.2.3 (FreeBSD) and Apache 2.0.59 (Windows XP). What's the reason of this behavior and are there any workarounds?
*** This bug has been marked as a duplicate of 38642 ***