httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R & S Buckland" <buckl...@bigpond.net.au>
Subject Re: How to identify http://user@ in URL with no Auth
Date Sat, 09 Feb 2002 23:51:03 GMT
More on this,

Eventually what I want to do is in Apache, setup the config so that

https://user1@host.com/index.html > returns /some/path/user1/index.html
https://user2@host.com/index.html > returns /some/path/user2/index.html

Can it be done ?


----- Original Message -----
From: "R & S Buckland" <buckland@bigpond.net.au>
To: <users@httpd.apache.org>
Sent: Saturday, February 09, 2002 10:26 PM
Subject: How to identify http://user@ in URL with no Auth


> Hi,
>
> Here is an interesting problem / task.
>
> Given a url like http://user@host.com/path
> I would like to identify the 'user' portion and make it available
> as an environment variable to the script (PHP).
>
> Obviously this username and a password would normally be passed
> as authentication to a server if it request authorisation (no?).
>
> What I have tried is:
>
>     Turn on Authtntication and created a htpasswd user 'user1' with no
> password
>     I Hit the URL    http://user1@host.com/path/to/htpasswded/directory/
>     but I got prompted with a dialog for authentication
>
> My questions would be:
> +    Without authentication turned on, does the browser pass this
> information to apache?
> +    If so where would it be located (I check the enviromnet and server
vars
> and found nothing)
> +    Can it be turned on to be accessible ?
> +    If I turn on authentication, can apache accept the provided username
as
> valid and proceed to use it
>     instead of prompting with a 401 ? (forcing an authenticvation prompt
at
> the browser)
>
> Ahh such fun!
>
> (My fallback so far is to use javascript on the first page
> which looks for the user1@ in the document.location
> and then redirects the browser passing info back to the
> server.. not neat but it does work.. i would prefer to
> do this at the server though through some sort of config etc)
>
> any ideas would be greatly appreciated.
> ramon
>
>
> ---------------------------------------------------------------------
> 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