I am using Amazon Ec2. I am not professional in .htaccess , i have referred following .htaccess
RewriteCond %{HTTP_HOST} ^([\w-]+).example.com$
RewriteCond %{REQUEST_URI} !^/example.com/
RewriteRule ^(.*)$ /example.com/$1?subdomain=%1 [LAST,QSA]
when i try to execute this username.example.com
to example.com/subdomain?id=username
I am using EC2 amazon server.
1st issues is if i am trying to execute username.example.com
then this domain is not getting resolved.
2nd issue the above htaccess is not working for me . If any one could solve this will be helpful