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.
- Choose the Settings tab.
- 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.
Any currently defined short URLs will be listed in the Existing Short URLs
web part. Notice in the above screencap, the server portion was stripped off and the target begins with /home/Demos....
You can click the Test
link to try your short URL. You can also directly type the short URL into a new browser tab and you will be taken directly to the target.
- Try it now by pasting into a browser: www.labkey.org/important.url
buttons to manage the existing short URLs.
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.