title: Handle pretty http requests for domain and subdomain
body: <p>The current active urls system is like: </p>
  
  <pre><code>http://example.com/dashboard/pages.php
  http://example.com/dashboard/page.php?id=10
  </code></pre>
  
  <p>So I want that the same url will be accessible if use:</p>
  
  <pre><code>http://example.com/dashboard/pages
  http://example.com/dashboard/page/id/10
  </code></pre>
  
  <p><a href="http://example.com/dashboard" rel="nofollow">http://example.com/dashboard</a> is pointing to /var/www/html/dashboard</p>
  
  <p>And again when I am using subdomain then I want that the same url will be accessible if I use:</p>
  
  <pre><code>http://subdomain.example.com/pages
  http://subdomain.example.com/page/id/10
  </code></pre>
  
  <p>Then the active urls system is like : </p>
  
  <pre><code>http://subdomain.example.com/pages.php
  http://subdomain.example.com/page.php?id=10
  </code></pre>
  
  <p><a href="http://subdomain.example.com" rel="nofollow">http://subdomain.example.com</a> is pointing to /var/www/html/dashboard</p>
  
  <p>So the root directory of the domain and subdomain is not the same.</p>
  
  <p>And I want it only for php files. I dont want that it affect the css or js folder structure anyway as I am using relative path.</p>
  
  <p>Can anyone please help that what should be the htaccess content? I am very bad in regular expression handling.</p>