Hello! I want to make a site and need help with a script. Please read the information carefully: Let's think that i have the domain example.com . I want when i visit test.example.com or SthElse.example.com to say the subdomain. I mean that on test.example.com it would say "test" and on SthElse.example.com it would say "SthElse" . If it's not possible with subdomains, is it possible to make it like following? I want to have example.com for the main site, but if someone visits example.com/test it would say "test". So instead of subdomain, a folder. But the important thing is that these folders or domains won't have to be registered. I would give you an example of this script, but i can't cause it has a porn photo. If you want to see the site and understant what i mean, pm me. I can't tell this site to public. Thanks a lot for your time reading this.
For subdomains: Add a *.example.com A record in your DNS Zone for example.com Create a server alias in httpd.conf to *.example.com Use the $_SERVER['HTTP_HOST'] parameter to explode the details before the .example.com and echo it. Jay
A positive reputation would be appreciated For folders, you can simply user a rewrite rule such as: ^([A-Za-z0-9]+)$ Code (markup): to index.php In your .hta* file. Jay