Loading...
 
Skip to main content

History: URL shortener

Source of version: 33 (current)

Copy to clipboard
            ! URL Shortener
New in ((Tiki19)). 

An URL shortener is a tool that allows you to shorten a long URL to a short URL without changing the destination page. A URL shortener can be used to go from 100 characters to 25 characters.

The problem: End users copy paste long, ugly URLs into Tiki. Later, the URL changes (e.g. for site upgrade testing, or domain update, etc.) and we have issues.

This feature takes advantage of ((Custom Routes)).

!!# Operation in Tiki
!!!# Requirements
To use the Short URL function you must enable it first and for that you must go to __Settings -> Control Panel -> SEF URL__, in this interface you will not see it unless you enable the Advanced option in "Preference Filters", because __Short URL__ is an advanced option.
Once this is done, check the "Short URL" option and validate the operation by clicking on the "Apply" button. Note that Short URL requires the activation of the ''__"Custom Routes"__'' feature, which also requires the activation of the ''__"Search engine friendly URL"__'' and ''__"Add base tag in the HTML head section"__'' features.

A faster way to activate is to search with the keyword ''__sefurl_short_url__'' in __Settings-> Control Panels__ next in the search preferences bar to type __''sefurl_short_url''__.

!!!# Process
As we have already mentioned, "Short URL" requires activation of some other features:
* "Search engine friendly URL", __Settings -> Control Panels -> SEF URL__ (https://example.org/tiki-admin.php?page=sefurl). You can enable this feature by looking for the __feature_sefurl__ preference in the Search preferences bar.
* "Add base tag in the HTML head section", __Settings -> Control Panels -> Look & Feel__, in "Miscellaneous" tab (https://exemple.org/tiki-admin.php?page=look#contentadmin_look-6). You can also search __feature_html_head_base_tag__ in the Search preferences bar.
* "Custom Routes", __Settings -> Control Panels -> SEF URL__, enable the Advanced option in "Preference Filters", validate the "Custom Routes" option and click on the Apply button. You can also do this by simply searching for __feature_sefurl_routes__ in the Search preferences bar.

!!!# Some illustration images 

!!!!# First method
{img src="display1760" link="display1760" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="Short URL first method"}

!!!!# Second method 
{img src="display1759" link="display1759" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="Short URL second method"}

!!# Use 
The use of Url shortcuts can be done in wiki on the following features:
* Wiki page
* Blog
* Forum
* Trackers and Tracker Items

The way to proceed or use it remains the same for all: 

We will take as example the wiki and Blog pages, below how to do it 

{img src="display1761" link="display1761" width="400" rel="box[g]" imalign="center" desc="Click to expand" align="center" styleimage="border" alt="Examples for Wiki page and Blog"}

Namely, this feature also applies to the elements of each basic feature, i.e. for example we can shorten the URL of a blog and those of all its articles. This same principle also applies to Forums and Trackers.

Commits:
* http://sourceforge.net/p/tikiwiki/code/65842
* http://sourceforge.net/p/tikiwiki/code/66009
* http://sourceforge.net/p/tikiwiki/code/66519

!! Related
* ((Apache Clean URLs))
* ((Search Engine Friendly URL))
* ((URL conversion from absolute to relative))
* ((Custom Routes))