title: Rewrite Rule Redirect Sub Folder
body: <p>I'm stuck on how to write a dynamic re-write rule or if it's even possible. The original path the files will not exist at but will exist at the new path as physical files. The first, second and 3rd directories in the request will be static except the 2nd directory which can be any integer. The 3rd directory can be one of 2 choices but does not impact the final path. </p>
  
  <p><code>/test/1/name/folder/test.js
  /anotherpath/1/folder/test.js
  </code></p>
  
  <p><code>/test/44/name/test.js
  /anotherpath/44/test.js
  </code></p>
  
  <p><code>/test/55/name/folderagain/txt.txt
  /anotherpath/55/folderagain/txt.txt
  </code></p>