You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Arturo P <pe...@flashmail.com> on 2004/01/05 01:24:47 UTC
[users@httpd] What is the purpose or possible use of the @ in URL's
Hello,
I'm very curious as to the functionality of the @ in urls. I run a user
supported website off Apache. And I'm curious if i could do something
such as redurect a user to a specific path, such as
http://username@domain.com would be redirected to
http://users.domain.com/username.
Thank you
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] What is the purpose or possible use of the @ in
URL's
Posted by Arturo P <pe...@flashmail.com>.
Yah I've already considered the Javascript hack. Kinda untidy as you so
noted. Pity though. Would have been a nice trick. I'll do the javascript
way as a last resort.
Thanks for you answer.
Peace
Brian Dessent wrote:
>Arturo P wrote:
>
>
>
>>I'm very curious as to the functionality of the @ in urls. I run a user
>>supported website off Apache. And I'm curious if i could do something
>>such as redurect a user to a specific path, such as
>>http://username@domain.com would be redirected to
>>http://users.domain.com/username.
>>
>>
>
>The part in front of the @ represents the username for authentication.
>So it's not sent to Apache as part of the URL in the request. You might
>be able to do what you want with mod_rewrite by making a rule that
>matches requests with that username. But unless the page that is being
>requested requires authentication the browser will not send a username
>at all. So in the case of a normal URL apache has no idea what's in
>front of the @, just as everything in a URL after the '#' is meant to
>refer to a specific anchor the page and is not sent by the browser
>either.
>
>YOu might be able to do what you want with a client-side javascript
>hack, but it wouldn't be pretty. You could have it check
>document.location and see if it contains a username, and if so do a
>redirect to the appropriate user page URL. But the user would still be
>fetching the first page and then reloading the new page after the
>javascript executed.
>
>Brian
>
>---------------------------------------------------------------------
>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
> " from the digest: users-digest-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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] What is the purpose or possible use of the @ in URL's
Posted by Brian Dessent <br...@dessent.net>.
Arturo P wrote:
> I'm very curious as to the functionality of the @ in urls. I run a user
> supported website off Apache. And I'm curious if i could do something
> such as redurect a user to a specific path, such as
> http://username@domain.com would be redirected to
> http://users.domain.com/username.
The part in front of the @ represents the username for authentication.
So it's not sent to Apache as part of the URL in the request. You might
be able to do what you want with mod_rewrite by making a rule that
matches requests with that username. But unless the page that is being
requested requires authentication the browser will not send a username
at all. So in the case of a normal URL apache has no idea what's in
front of the @, just as everything in a URL after the '#' is meant to
refer to a specific anchor the page and is not sent by the browser
either.
YOu might be able to do what you want with a client-side javascript
hack, but it wouldn't be pretty. You could have it check
document.location and see if it contains a username, and if so do a
redirect to the appropriate user page URL. But the user would still be
fetching the first page and then reloading the new page after the
javascript executed.
Brian
---------------------------------------------------------------------
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
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org