title: Using .htaccess to Rewrite URLs with ID and Filename
body: <p>I am trying to rewrite a URL with .htaccess and had a question that I'm unable to find an answer to after many hours of searching. And, it doesn't help that my regex skills aren't that great...</p>
  
  <p>The underlying format for my URLs is this: <code>http://mysite.com/article.php?id=1</code>.</p>
  
  <p>I would like to have a URL like this direct there: <code>http://mysite.com/article/1/made-up-irrelevant-title-slug</code>.</p>
  
  <p>The problem is, I'd like the <code>article</code> to be a variable such that it could be changed to <code>page</code> and would direct to something like: <code>http://mysite.com/page.php?id=1</code>, from <code>http://mysite.com/page/1/made-up-page-name</code>.</p>
  
  <p>If anyone knows how this is properly written, I would be extremely grateful!</p>