I have shared hosting from GoDaddy. I want to create(illusion) sub-domains dynamically from URL parameters.
For e.g. http://example.mydomain.com/value1/value2
points to
http://www.mydomain.com/?domain=example&m1=value1&m2=value2
I have created A wildcard DNS record. I also have added these rules in .htaccess
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]
But when I open http://example.mydomain.com I get "pageok" as output.
Please help. Thanks in advance.