Hey there, I've been busy with a website, but at the moment I'm stuck on a problem. I'd like to make subdomains automatically with PHP, but don't know how to do that. After I fill in a form, PHP should create a subdomain and an url for redirecting from the subdomain. I want to use this for search engine optimalisation, I heard this is a good way to index the website into Google. I saw http://www.2dehands.nl/ uses the same system: By clicking a category you'll go to http://CATEGORY.2dehands.nl/ So, is this possible and if it is: How? I've heard about wildcard and mod rewrite, but I don't know what is the best option and how to create it. Many thanks, Peter Bosch.
You should edit your .htaccess file. http://www.tips-scripts.com/?tip=pointing#tip Go there, and scroll to the bottom example which starts with "There is a second approach where..." This makes it sound like what you want.
Hmm, I have to create dirs myself this way. And only this .htaccess change isn't enough. I have to change my DNS settings also. If I add "* A SERVER-IP" to my DNS settings and I'm going to a random subdomain page, I see an apache screen saying "Hey, it worked !". Anyone knows how to fix this?