Using MVC. Is there a way to make any url like .example.com to point to example.com/user/
as in http://marwan.example.com to point to example.com/user/marwan
The controller is user and the action is index which takes marwan as its variable.
One idea I had is to make a custom error page to handle 404 and see if the url starts with something like *.example.com and redirect to the proper controller. There must be a better way to do this!