RewriteRule fails if called after line 112 of .htaccess I'm having an issue that is similar to this question. 

In short, I'm trying to use some custom RewriteRules to point old (no longer functioning) urls to new working urls. To accomplish this, I'm trying something similar to:

RewriteRule ^oldsite/directory/ABCD(.*)\.html? /search/$1 [NC,R=301,L]


The issue is, this is completely ignored (as mentioned in the question linked to before.) However, I've noticed that if I move my RewriteRule from the bottom of the .htaccess file up a bit to line 112, which is:

# Pass all requests not referring directly to files in the filesystem to
  # index.php. Clean URLs are handled in drupal_environment_initialize().
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^ index.php [L]


The the rewrite rules work just perfectly fine. The answer to the previous question said that you couldn't use a clean url destination. So this would work:

RewriteRule ^home/code/([^/]+) ?q=home/software/node/&amp;code=$1


but this won't:

RewriteRule ^home/code/([^/]+) home/software/node?code=$1


Problem is neither of them seem to work for me. I remember a few D7 updates ago there was an update to the .htaccess files. Could that be effecting this? Is there another way around this issue to get RewriteRules to work?
Just put it above line 112. The reason it doesn't work below that is line 117:

RewriteRule ^ index.php [L]


that [L] means that if the conditions above it match and that rule is applied no further rules will be checked. If you put it above that line clean or non-clean style url will work fine but probably don't want to include an L on the end of your rule so use:

RewriteRule ^home/code/([^/]+) home/software/node?code=$1 [R=301,NC]


on line 111 (well whatever actual content rule you need).