Ok I have a site that I'm trying to build up and basically it's been running off the temporary url that my host offers for when the dns resolves it's built some traffic on that url.
What I want to do is make it so that people can still acess urls on that site, but if google comes around it shows a 301 redirect. Right now I'm doing this with a 301 redirect with htaccess so that all urls are sent to the domain.
What I'd like is to have htaccess do a 301 for all urls except the main page, so that if user enters http://subdomain.host.com it shows them the site but when google comes to the page it tells them 301 to the actual domain. All other urls on that subdomain should 301 to the domain.
So basically I need either an htaccess or php way of making it so that just the main page is accessible on the subdomain, and that all other urls are directed through the domain.
I was thinking htaccess could be used to allow 1 url to be accessible on the subdomain and all others 301 to the domain. Then I would write some php on the main file to detect the url entered and if subdomain and google - 301 to the main domain with headers.