title: Apache Rewrite. Rewrite to URL if URL contains a string
body: <p>I am trying to achieve the following setup but I am struggling to write it in the apache syntax required:</p>
  
  <p>If URL contains "smeghead" then redirect to smeghead.php?(full url copied here).</p>
  
  <p>It is for a permissions issue, I want to run the string it passes in to smeghead.php to a permissions function.</p>
  
  <p>Any help would be most appreciated.</p>
  
  <p>Thanks</p>