Short URLs

2024-03-28

Short URLs allow you to create convenient, memorable links to specific content on your server that make it easier to share and publish information you want to share. Instead of using an outside service like TinyURL or bit.ly, you can define short URLs within LabKey.

For example, say you're working with a team and have discovered something important about some complex data. Here we're looking at some sample data from within the demo study on labkey.org. Instead of directing colleagues to open the dataset, filter for one variable, sort on another, filter on a third, all these operations are contained in the full URL.

You could certainly email this URL to colleagues, but for convenience you can define a shortcut handle and publish a link like this, which if clicked takes you to the same place:

Note that the same filters are applied without any action on the part of the user of the short URL and the full URL is displayed in the browser.

The full version of a short URLs always ends with ".url" to distinguish it from other potentially conflicting resources exposed as URLs.

Define Short URLs

Short URLs are relative to the server and port number on which they are defined. The current server location is shown in the UI as circled in the screenshot below. If this is incorrect, you can correct the Base Server URL in Site Settings. Typically a short URL is a single word without special characters. The

To define a short URL:

  • Select (Admin) > Site > Admin Console.
  • Click Short URLs in the Configuration section.
  • Type the desired short URL word into the entry window (the .url extension is added automatically).
  • Paste or type the full destination URL into the Target URL window. Note that the server portion of the URL will be stripped off. You can only create short URLs that link to content on the current server.
  • Click Submit.

Any currently defined short URLs will be listed in the Existing Short URLs web part.

You can click the link in the Short URL column to try your short URL. You can also click the icon to copy the short URL to the clipboard, then try it in a new browser window. You will be taken directly to the target URL.

To edit an existing short URL, hover and click the icon for the row.

To delete one or more, select the desired row(s) and click .

Security

The short URL can be entered by anyone, but access to the actual target URL and content will be subject to the same permission requirements as if the short URL had not been used.