views:

16

answers:

2

Hey there Stack OVerflow

Is it possible to redirect everything in a subdomain to the main domain.

Eg

anything.example.com

something.anything.example.com

must all go to example.com

and

anything.example.com/page.php

something.anything.example.com/page.php

must all go to example.com/page.php

is this possible ? on a shared host ?

+1  A: 

yah, sure that's possible. just set up a subdomain that's a wildcard (* on most apaches) and set the VH to be the site root.

aharon
+1 .. excellent.. this works great for me :) thank you
atif089
A: 

It's possible if you have access to the DNS records. You have to add an A-record, with as values * and the ip of example.com

Dave