title: Mod Rewrite Dynamic Paths (no query)
body: <p>I am trying to create redirects to content on my old site in the form of:</p>
  
  <p><code>domain.com/fiction/UNIQUE/book</code> to
  <code>sub.domain.com/fiction/UNIQUE/book</code></p>
  
  <p>Not all pages on <code>domain.com</code> should redirect to <code>sub.domain.com</code>. Just the ones that contain <code>/fiction/</code>. <code>UNIQUE</code> is a dynamically generated <code>ID</code>.</p>
  
  <p>So this should be simple to check for the existence of <code>domain.com/fiction/</code> and replacing with <code>sub.domain.com/fiction/</code> then adding the rest of the string <code>/UNIQUE/book</code>.</p>
  
  <p>I have looked at Mod Rewrite and posts with <code>QUERY_STRING</code>, but my understating is limited and this appears to only be applicable with ?query style dynamically generated pages.</p>
  
  <p>Thanks for any help.</p>