Re: Implement @-domains with PHP?

From: Date: Wed, 13 Feb 2002 15:09:37 +0000
Subject: Re: Implement @-domains with PHP?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84580@lists.php.net to get a copy of this message
Hi folks! To end the discussion of how my posting has to be understood, I will further explain my idea: In Germany there's a web-space provider called 1&1 puretec (http://www.puretec.de/). They offer a feature called @-domain: Every time a user enters something like http://username@sitename.domain/path/to/file.ending, "username" is mapped to a directory one can define. Thus, the name @-domain. The provider I'm talking of uses some JavaScript code similiar to this to achieve the redirection: <script language="JavaScript"> var s = location.href.substring(0, location.href.indexOf("@")); if (s.substring(0, 7).toLowerCase() == "http://"); s = s.substring(7); location.replace(s + "/index.html"); </script> This will effectively map "username" to "./username/index.html" or - to be more precise - to "/path/to/username/index.html", since we are already in "/path/to/file.ending". This way, one can construct some HTTP-address like this http://customerservice@blichmann.de and use some email-account like this: customerservice@blichmann.de That would be cool since you only have to cut & paste the URL to the "To:"-field of your email-client... Sorry, I didn't know @-domains didn't go international, yet. I was just looking for a way to do this using PHP, but since "username" isn't actually sent, unless you use "WWW-Authenticate", it should be a quite impossible thing to do. Question: Does anybody know a way to prevent the browsers login-dialog - you could then catch "username" using $PHP_AUTH_USER (or similiar) and redirect as appropriate? Another problem: can I use a blank password for authentication? That would effectively mean @-domains... Regards, -- Christian _____________________________________________ don't hesitate - email me with your thoughts: e-mail: feedback.nospam@blichmann.de - please remove the ".nospam" from address. _____________________________________________ do you want to know more? web: http://www.blichmann.de

« previous php.general (#84580) next »