httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Grace" <rub...@earthlink.net>
Subject Re: @Domains
Date Wed, 30 Jan 2002 16:21:34 GMT

> From: "Rüdi" <cael@mahold.de>
> To: <users@httpd.apache.org>
> Sent: Wednesday, January 30, 2002 7:50 AM
> Subject: @Domains
>

> Hi,
> i saw that some ISP's offer an option like using a email-address
> as URL (like http://test@test.de).
> Any ideas if such a configuration can be done by apache?
> thanx in advance
> Rüdi

The @-sign notation in URLs is simply a way of specifying a username (and
optionally a password) with a URL. If you have URLs that are password
protected via an authentication scheme, you can specify a username (and
optionally a password) directly in the URL.

http://host.domain.com/    -- Attempts to retrieve host.domain.com's
homepage. Sends no authentication information.
http://fred@host.domain.com/    -- Attempts to retrieve host.domain.com's
homepage. Sends fred's username. (This is often followed by the webbrowser
getting a 403 and then asking the enduser for fred's password.)
http://fred:topsecret@host.domain.com/    -- Attempts to retrieve
host.domain.com's homepage, sending fred's username and 'topsecret' as a
password.

Note that these work for FTP URLs as well, and probably some others. Now
your mention of using it as an email address leaves a few interesting things
that could possibly be done:

- Webmail client. Just tell your users to go to http://their-email-address/.
You'd definitely want to ask for their password at some point, and you'd
probably want to do something to the index file (index.{html|php|cgi|lk}) to
seperate the email portion out of what will probably be the file for your
homepage. Apache doesn't support this out-of-the-box, but with the right
programming in the right scripting language it can be done (I like php -
<http://www.php.net/ - and am a shameless advocate of it as well.)

- An equivalent to http://host.domain.com/~username requests. Again, Apache
doesn't support this out of the box, but the scripting would be a bit
simpler -- simply have your script send a Location:
http://host.domain.com/~<whatever name is entered> header if any valid
username is specified. You wouldn't want to prompt for a password in this
case. The downside of this is that some webbrowsers probably won't remember
the username in a http://user@host/-style URL, and thus when they went to
return to the bookmarked site they'd get the wrong one. Again, Apache
doesn't support this out of the box but it can be done with a little bit of
scripting effort.

-- Daniel Grace <rubein@earthlink.net>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message