title: remove beginning forward-slash on htaccess RewriteRule
body: <p>The forward-slash in my htaccess file is having problems. I need this htaccess to work on multiple servers with different domain names.</p>
  
  <p>I am trying to use the %{HTTP_HOST} parameter to make the domain portion of the rewriterule dynamic. It is working for the most part, except that the domain name is getting '/' put in front of domain.com</p>
  
  <p>example:</p>
  
  <p>/domain.com/folder/detail</p>
  
  <p>How can I remove that first '/'? Here is my code:</p>
  
  <pre><code>RewriteCond %{REQUEST_URI} ^/folder/([^\.]+)
  RewriteRule ^([^\.]+)/([^\.]+)$ %{HTTP_HOST}/$1.php/$2 [NC,L]
  </code></pre>
  
  <p>I am not trying to redirect to another domain, this htaccess file will be with a project that will need to run on multiple servers(local and remote). They all have different domain names to them. so htaccess needs to be dynamic about it. </p>
  
  <p>On one remote server it is trying to route from the very root of the document not going through the http_host like <a href="http://domain.com" rel="nofollow">http://domain.com</a> for example. So this is why I am putting in %{HTTP_HOST}.</p>
  
  <p>The problem is rewriterule is prepending a '/' to the rewrite automatically. </p>
  
  <p>Thanks a lot</p>