RE: [PHP] implement yourname.mysite.com redirection
| From: | Rick Emery | Date: | Mon, 18 Feb 2002 17:21:22 +0000 |
| Subject: | RE: [PHP] implement yourname.mysite.com redirection | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-85228@lists.php.net to get a copy of this message | ||
You can also do this via a PHP script, which is what I do. I have 5 URLs
all going to the same site (500 megs disk space). I parse the subdomain,
and re-driect to the appropriate sub-directory.
Actually, you don't even need to parse the URL for sub-domain. Just search
for the "yourname.mysite.com" as a string in the database and then
re-direct. You don't needt vitual hosts to accomplish this. HOWEVER, you
do need access to your DNS so that you can create A and CNAME records
therein.
-----Original Message-----
From: Adrian Murphy [mailto:adrian.murphy@2020tourism.com]
Sent: Monday, February 18, 2002 3:48 AM
To: php-general@lists.php.net
Subject: [PHP] implement yourname.mysite.com redirection
Hi,
I'd like to implement a system whereby people have a subdomain on my site
like so:
yourname.mysite.com
I've been reading the apache docs that say you can do this via virtual
hosts.
Can I do it so 'yourname' can be anything - where all requests are sent
to the same page where i can parse the uri and query a db based on
'yourname'.
any reason why my isp might be reluctant to do this.I'm presuming I can't
do it via .htaccess?
as a side note what are the affects of this kind of redirection as far as
search engines
go.I've heard that doing this kind of thing on a 404 page is a bad idea.