title: Apache Query String Rewrite
body: <p>I'm trying to rewrite a query string in Apache.</p>
  
  <p><strong>The current (example) domain is:</strong>
  example.com/?domain=domain.com</p>
  
  <p><strong>I would like this to then be rewritten into:</strong>
  example.com/domain.com</p>
  
  <p><strong>So, when a user enters:</strong>
  example.com/?domain=domain.com</p>
  
  <p><strong>They are always redirected to the pretty version:</strong>
  example.com/domain.com</p>
  
  <p>I've tried quite a few different rewrites, such as:</p>
  
  <pre><code>RewriteEngine On
  RewriteRule ^([^/]*)$ /?domain=$1 [L]
  </code></pre>
  
  <p>But this fails to work (i.e. nothing happens) with .htaccess and ModRewrite enabled.</p>
  
  <p>Any help would be greatly appreciated.</p>