title: htaccess Subdomain RewriteRule
body: <p>I've been trying to rewrite the following URL:</p>
  
  <blockquote>
    <p><a href="http://subdomain.domain.com/pages/my100page.html" rel="nofollow">http://subdomain.domain.com/pages/my100page.html</a></p>
  </blockquote>
  
  <p>to:</p>
  
  <blockquote>
    <p><a href="http://subdomain.domain.com/index.php?id=my100page" rel="nofollow">http://subdomain.domain.com/index.php?id=my100page</a></p>
  </blockquote>
  
  <p>This is what I came up with after researching:</p>
  
  <blockquote>
    <p>RewriteEngine On<br>RewriteCond %{HTTP_HOST} ^subdomain.domain.com$ [NC]<br>RewriteRule ^pages/([^/]*).html$ /index.php?id=$1 [L,R=301]</p>
  </blockquote>
  
  <p>But that didn't work, I ended up on a 404 error page. My .htaccess file is stored in the root of my website (not the subdomain folder), if that is any help.</p>
  
  <p>How could I get this to work?</p>
  
  <p>Thanks,<br>Daviga404</p>