I can't find any documentation for the tilde (~) when it's found at the beginning of a string in a URL. Is that something that points back to the root of the site?
The tilde character ("~") doesn't have any special meaning for URLs. It
is just another character which represents a part of the path.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
I can't find any documentation for the tilde (~) when it's found at the
beginning of a string in a URL. Is that something that points back to the
root of the site?
I can't find any documentation for the tilde (~) when it's found at the
beginning of a string in a URL. Is that something that points back to
the root of the site?
It's generally used for the concept of a "home" directory for a user.
For instance, my website URL is http://www.pobox.com/~skeet (although
that really directs to the "real" URL elsewhere). It's historically a
Unix thing, where ~foo is used to get to the home directory for user
foo.
I don't believe there's anything in HTTP which says how it should be
handled, so it's more of a convention than anything else.
that's about it... it's just another pathname character.
I can't find any documentation for the tilde (~) when it's found at the beginning of a string in a URL. Is that something that points back to the root of the site?
I can't find any documentation for the tilde (~) when it's found at the
beginning of a string in a URL. Is that something that points back to
the root of the site?
This is an under documented feature of ASP.NET Web Form controls. It
gets resolved to the application root by most (maybe all) ASP.NET server
controls. The ResolveUrl() method is what does the work (I think).
In UNIX, ~foo means "the home directory of user 'foo'."
In some web servers, ~foo is the public_html directory of user 'foo' -- same idea.
I can't find any documentation for the tilde (~) when it's found at the beginning of a string in a URL. Is that something that points back to the root of the site?
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.