title: Rewrite hyphenated URL to pascal case using apache mod_rewrite
body: <p>The user <strong>friendly URLs</strong> should be hyphened, for example:</p>
  
  <p><code>http://example.com/some-category/some-file</code></p>
  
  <p>My inherited folder structure however, is pascal cased, therefore the <strong>rewritten URL</strong> should look like this:</p>
  
  <p><code>http://example.com/SomeCategory/SomeFile.php</code></p>
  
  <p><strong>Note:</strong> The amount of words in a category or file name will vary, so don't expect consistency in that way. ex. <code>http://example.com/some-long-category/file</code>.</p>
  
  <p>Im wondering how to do this, with a general rewrite condition-rule pair for any category and file, using Apache's <strong>mod_rewrite</strong>.</p>
  
  <p>You can <strong>test</strong> your rules <a href="http://htaccess.mwl.be/" rel="nofollow noreferrer"><strong>here</strong></a>, without the need to setup an Apache server.</p>