title: Create subdomains dynamically from URL parameters
body: <p>I have shared hosting from GoDaddy. I want to create(illusion) sub-domains dynamically from URL parameters.</p>
  
  <p>For e.g.
  <a href="http://example.mydomain.com/value1/value2" rel="nofollow">http://example.mydomain.com/value1/value2</a></p>
  
  <p>points to</p>
  
  <p><a href="http://www.mydomain.com/?domain=example&amp;m1=value1&amp;m2=value2" rel="nofollow">http://www.mydomain.com/?domain=example&amp;m1=value1&amp;m2=value2</a></p>
  
  <p>I have created A wildcard DNS record. I also have added these rules in .htaccess </p>
  
  <pre>
  RewriteEngine On
  RewriteCond %{HTTP_HOST} !^www\.mydomain.com
  RewriteCond %{HTTP_HOST} ^(.+).mydomain.com
  RewriteRule ^([^/]*)$ http://www.mydomain.com/index.php?domain=%1&m1=$1&m2=$2 [P,L]
  </pre>
  
  <p>But when I open <a href="http://example.mydomain.com" rel="nofollow">http://example.mydomain.com</a> I get "pageok" as output.</p>
  
  <p>Please help. Thanks in advance.</p>