Im pretty sure this question must have been asked before but I cant find anything. I would like to create 2 versions of my website one where the mobile version is displayed in a subdomain such as m. and then the regular version for desktop.
Ive searched SO, a similar question is asked here, but no direct answer is given rather it only talks about advantages and disadvantages, which at this stage does not concern me.
Ive searched the web and came across a post from Mozilla where they mention the use of user-agent-detection but I cant for the life of me find a good example (perhaps im typing wrong queries)
If anyone can provide me with an example / or a good link with how I can serve two different websites based on browser view-port size it would be greatly appreciated.