[Tutorial] Create shorter forum URLs

Discussion in 'Basic Tutorials' started by 314, Jun 6, 2016.

  1. 314

    314 Irrational GameAdmin, former ServerAdmin
    EcoLegend ⛰️⛰️⛰️⛰️ Ex-President ⚒️⚒️ Prestige ⭐ VI ⭐ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    7,219
    Trophy Points:
    97,160
    EcoDollars:
    $6,000,000
    Ratings:
    +4,955
    I assume this happened to you before. You created a thread, then wanted to link it on the server. It turns out that the link is far too long to append it to your message and you need to dedicate a new trade message to that URL. It annoys you because you can post less text and it annoys others because these URLs are annoyingly long.

    Inspired by @Ndm57dcraft's posting of https://www.ecocitycraft.com/forum/threads/suggestion-a-new-way-to-make-money-a-new-pvp.151489, I will be using this as an example.


    Please ignore all spaces I have added to the URLs, this was necessary to prevent the forum from colouring it in blue.

    The original URL:
    https:// www. ecocitycraft.com /forum/threads/ suggestion-a-new-way-to-make-money-a-new-pvp . 151489

    This URL consists of:
    https:// - The protocol. HTTPS.
    www. - The "World Wide Web" subdomain.
    ecocitycraft.com - ECC's domain.
    /forum/threads/ - The server's file path for threads.
    suggestion-a-new-way-to-make-money-a-new-pvp - The title.
    . - A separator between the title and the ID.
    151489 - The thread's ID.

    Which parts of that can be omitted?
    Especially the title. The thread is merely identified by the ID.

    Current status:
    https:// www. ecocitycraft.com /forum/threads/ . 151489

    Now, if you remove the title, the separator is no longer needed. Remove the period in front of the ID.


    Current status:

    https:// www. ecocitycraft.com /forum/threads/ 151489

    Now, this looks a lot better. If you wish, you can erase even more.
    The protocol. When omitting the protocol, the server will still make your browser redirect to it. Therefore, you can remove it.

    Current status:
    www. ecocitycraft.com /forum/threads/ 151489

    We are almost done.
    When no subdomain is specified, the browser assumes "www." as the subdomain. We can remove the www., too!

    What can be removed in total?
    https:// www. ecocitycraft.com /forum/threads/ suggestion-a-new-way-to-make-money-a-new-pvp . 151489

    The (optimal) result:
    ecocitycraft.com /forum/threads/ 151489


    94 characters reduced to 37.
    3 out of 7 parts of the original URL remain, and it is still fully functional.
    This is how you create shorter URLs that are clickable in chat and still redirect to the thread you originally wanted to link to.

    Please note that these links are clickable ingame, but not on the forum. If you wish to retain their interactivity on the forum, simply re-add the www. in front of the final URL.


    Welcome to the wonderful world of:
    1. Networking and
    2. xenForo's affection for adding irrelevant thread titles to URLs.
     
    • Like Like x 1
    • Agree Agree x 1
    • List
    #1 314, Jun 6, 2016
    Last edited: Jun 6, 2016
  2. KingNdm

    KingNdm ECC Sponsor
    ECC Sponsor Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Jan 18, 2013
    Messages:
    1,049
    Trophy Points:
    59,660
    Gender:
    Male
    Ratings:
    +1,495
    I was used in a PI suggestion! Yay!

    +1 though, l love the idea, makes things quicker and easier.
     
    • Optimistic Optimistic x 1
    • List
  3. 314

    314 Irrational GameAdmin, former ServerAdmin
    EcoLegend ⛰️⛰️⛰️⛰️ Ex-President ⚒️⚒️ Prestige ⭐ VI ⭐ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    7,219
    Trophy Points:
    97,160
    EcoDollars:
    $6,000,000
    Ratings:
    +4,955
    In what way is this a suggestion...? ;-;
     
  4. KingNdm

    KingNdm ECC Sponsor
    ECC Sponsor Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Jan 18, 2013
    Messages:
    1,049
    Trophy Points:
    59,660
    Gender:
    Male
    Ratings:
    +1,495
    I'm stupid! hahaha. Didn't realize this is actually a thing xD

    Well I'll try to remember this for next time, thanks :D
     
  5. SuburbSomeone

    SuburbSomeone Shrubby Tycoon
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Apr 9, 2013
    Messages:
    3,337
    Trophy Points:
    74,090
    Gender:
    Male
    EcoDollars:
    $0
    Ratings:
    +6,479
    More people should know this, I do this all the time.
     
  6. Videowiz92

    Mythic ⚔️ I ⚔️ ECC Benefactor President ⛰️⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐⭐ X ⭐⭐ Gameplay Architect Premium Upgrade

    Joined:
    Jan 30, 2012
    Messages:
    3,033
    Trophy Points:
    77,660
    Gender:
    Male
    Ratings:
    +1,207
    I've always done this when posting links to the game without using tinyurl. But is it perhaps possible to make the urls short like this, at least to exclude the title and separator, or is this forced by xenForo?
     
  7. 314

    314 Irrational GameAdmin, former ServerAdmin
    EcoLegend ⛰️⛰️⛰️⛰️ Ex-President ⚒️⚒️ Prestige ⭐ VI ⭐ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    7,219
    Trophy Points:
    97,160
    EcoDollars:
    $6,000,000
    Ratings:
    +4,955
    I'm not sure what you mean here... if I understand your question correctly: xenForo seems to add the title plus separator no matter what you do, there is no way to get the short URL without modifying it.
     
  8. Videowiz92

    Mythic ⚔️ I ⚔️ ECC Benefactor President ⛰️⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐⭐ X ⭐⭐ Gameplay Architect Premium Upgrade

    Joined:
    Jan 30, 2012
    Messages:
    3,033
    Trophy Points:
    77,660
    Gender:
    Male
    Ratings:
    +1,207
    That was what I was asking :)