For those making quick bookmarks, shortening links, etc.

    Once I noticed one interesting thing. Everything would seem logical - but the effect can be used.

    1. Open any page in a browser, for example http://example.com/ .
    2. Then, type an address in front of the address, for example, the domain habrahabr.ru and put a question mark '?' After it, so that the line
    habrahabr.ru?http://example.com/ is obtained .
    3. Now, if you download the received address, the browser will display this page: http://habrahabr.ru?http://example.com/ .

    That is, if routing is not configured, then we can talk about the fact that a variable named http://example.com was passed through GET to the script habrahabr.ru/ .

    There in the script you can get the name of this variable and do whatever you want with it:
    - save it to bookmarks
    - shorten and give the user a short version of the link (similar to services like b23.ru )
    - anything else.

    Somehow, for the sake of interest, I made myself such a quick bookmarking service. The script after parsing and saving the link redirected to the received address and for me there were no changes on the screen.
    Naturally, for industrial use of this idea, you need a short domain with a very simple Taiping.

    This feature does not work in all browsers. For example, with a similar request, FF instead of passing the address to the script starts a search for the address using the default search engine. But if you put a slash before the question mark - it works.

    Also popular now: