Friday, 6 September 2013

Redirect all subdomain to a specific file

Redirect all subdomain to a specific file

I am new to this htaccess . So please help me to find a solution .
Lets say i have a domain name = example.com
Now i want when any subdomain is entered it will open a particular file ,
For example
demo.example.com >> Will redirect >> demo.example.com/test.php
check.example.com >> Will redirect >> check.example.com/test.php
anything.example.com >> Will redirect >> anything.example.com/test.php
Now that test.php should be in website root folder , means the structure
should be like this
For this i have already created a wild card subdomain as the same path as
the main domain .
Can this be done via htaccess .
Thanks a lot in advance .

No comments:

Post a Comment