title: Virtual subdomain using htacess, Pages rewrite rules
body: <p>I have make virtual subdomain in my code.like below</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^(.*)\.mysitename\.com
  RewriteRule ^(.*)$ agent.php?asitename=%1 [L,NC,QSA] 
  </code></pre>
  
  <p>it works fine, but it did not work for pages like</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} ^(.*)\.mysitename\.com
  RewriteRule ^(.*)/ag_buy.html ag_buy.php?sitename=%1&amp;page=buy [L,NC,QSA] 
  </code></pre>
  
  <p>it redirect all pages top agent.php, but it should only redirect home page to agent.php, for other pages it should work like ag_buy.html to ag_buy.php</p>
  
  <p>and so on.........</p>
  
  <p>please guide me on htaccess how can i make this possible.</p>