Hi!
I have to do somethign like this: 1) I have a site with users, and accessing their pages with some.php?user_id=... 2) I have to make username.example.com also work.
Any ideas? Thanks.
I can't think of a good reason why redirecting like this wouldn't work ...
header("Location: www.".$_GET['user_id'].".com");
but I maybe wrong ......
Blu
You will have to make sure that those domain names are mapped to your server.
And you may need to do some Apache redirecting in order to point them to the right content.
I've realized that i have to do some redirect in the .htaccess file, but didn't figure out exactly how to do it.
In that case, this may be an Apache question rather than a PHP question.
mod_rewrite is reasonably straightforward: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html