what is the use of “~” tilde in url? [closed]

允我心安 提交于 2019-11-27 08:13:18
vkrams

Actually tilde '~' represents home directory. When you place tilde in url, It will access from home directory

T.E.D.

Well, a webserver is free to use any character after the leading URI part for whatever purpose it wants.

That being said, the use of ~ generally hearkens back to the early days of the web, when just about every web server ran on Unix. In the Unix world, systems supported multiple users, each with their own home directory. If you want to go to your own home directory, you cd ~. If you want to go to some other user like fred's home directory, that would be cd ~fred.

So when people started putting up web servers, they would generally let every user in the system have their own web space, which is accesible from the root of the webserver by using ~username.

For example, a very old website of mine (now defunct) provided by an old ISP (Telepath) was at http://www.telepath.com/~dennison/

Tilde isn't anything special in the URLs. It's just another character like a %20 character or a -.

Some web host companies use it to identify users by giving the users directories like /~(username)/

A tilde in a URL usually is followed by a user name and indicates that the files below that URL come from that user's home directory.

~ refers to your home directory. If it is in the URL it means that the cpanel is located relative to your home directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!