Thanks for such a great post. I have added the following line in my htaccess file: RewriteCond %{HTTP_HOST} !^www\.mywebsite\.com [NC] RewriteCond %{HTTP_HOST} ([^.]+)\.mywebsite\.com [NC] RewriteRule ^(.*)$ http://www.mywebsite.com/controller/action/%1 [L] When i give the above, the page content is showing what i was expecting, but the problem i am facing is the page URL is also getting changed. I dont want that. What should i do? Is there something in the server that needs to be done? Please suggest. I am working with CakePHP Thanks.