Routing subdomain type of requests to a controller

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Routing subdomain type of requests to a controller

Anees
This post has NOT been accepted by the mailing list yet.
Hi,

i have a table called locations with structure as follows
id|
Location Name|
perma| - Unique
page content |

i have created a controller to list the page contents depends upon the location name
for example if i call
http://mysite.com/Location/index/loc_perma/newyork

it will take appropriate fields from Db and lists

Now
i need to make my url like this
http://newyork.mysite.com

and that time i need to load the same content when the above url is called

i have used router to set the variables after the domain name
but how can i make read the router the subdomain name

Please help

Regards,
Anees