I am working on one application in which admin creates sub-domain or folder with help of coding. It will look like following.
http://www.example.com/folder-name/
http://folder-name.example.com/
Its like multisite concept with same code base for different sub-domains.
Now what i need is that with help of htaccess i need to use code of root folder so when we open any of above link it will take me to http://www.example.com/index.php?id=xx. I am trying to work this with .htaccess but not getting any result and main thing should be in browser it must say any of above link only. Can anyone have idea how to do this?