lets says I have a domain example.com and I have wildcards dns switched on. on example.com a user can signup with username and password. once registration is done, username.example.com starts redirecting to example.com/script/script.php?user=username. address bar would still show username.example.com
what would be the contents of the .htaccess file to accomplish this?
I have zero expertise with mod_rewrite. please advise. thanks and regards.
Assuming your host is configured to serve up all hostnames from the same
DocumentRoot, then you’d want something a lot like this:If you’re on shared hosting and can’t specify a debug-log file, do your own tests on a test server you have access to.