I would like to have my site visitors go to a specific subdomain based on routeParams
for example if they go to "http://example.com/foo" they will be redirected to "http://foo.example.com"
Can I do that using the routeProvider with something like:
$routeProvider
.when('/:my_affiliate', {
redirectTo: function(routeParams){
return 'http://' + routeParams.my_affiliate + '.example.com';
},
})
;