Not a developer? Go to

Plugin and Theme Directory

ID Shorts v1.1.3

By Dan Wolfgang
Posted July 16, 2013, in Utilities.



This plugin provides a way to pass an entry ID or other shortcode to a cgi script and have it send the user to the entry permalink.

Creating the shortcode

The plugin allows for several kinds of shortcodes that may be used, all can be created from the edit entry screen:

  1. The entry id - this is the default value and can be used for any entry by visiting[mt:EntryID]
  2. An auto-generated “shortcode” - click the “Generate Shortcode” link to autogenerate a shortcode that can be passed to the cgi:[shortcode]
  3. A custom code or vanity path, entered into the Short URL Path field

After a value has been saved for the entry, a “Link” link will appear next to the “Generate Shortcode” link. This link will let you copy or visit the existing shortcode for an entry or page.

Using the “Generate Shortcode” link will hide the “Link” link until the entry is resaved, as the old link will no longer be valid.

WARNING: Changing the shortcode or vanity path for an entry will break any existing links to that shortcode.


Unarchive the plugin and copy id-shorts.cgi into your main Movable Type directory. Copy the contents of the plugins/ folder into your plugins/ directory.


  1. Edit an entry or page
  2. Find the Short URL Path setting under “basename”:
  3. Generate a random shortcode for the entry or page, or enter a custom path
  4. Save the entry.
  5. Click on the “Link” link next to the shortcode field to visit the short url.
  6. Get sent back to the entry or page’s permalink.


This plugin works best when you combine it with a tool like Apache’s mod_rewrite. Add this to your Apache config or .htaccess file:

RewriteEngine On
RewriteRule ^(\d{1,6})$ /cgi-bin/mt/id-shorts.cgi?id=$1&blog_id=<mt:BlogID> [L,R]

This says any one to six digit string after the hostname will be passed to id-shorts.cgi through the parameter id. Of course, you’ll want to change the path to match the actual location of your MT install and make the sure the matched text doesn’t conflict with a file or another rewrite rule. Also note that the blog_id parameter passes the current blog ID along; this is optional but required if you want to serve blog-level 404 Documents. After this, you should be able to visit[mt:EntryID] and go to the entry.


This plugin adds the <mt:entryshorturl> tag. The output of this tag is based on the blog level plugin setting for the short url template, which defaults to <mt:blogurl><mt:var name='id_shorts_path' />.

Plugin Settings:

IdShorts provides two blog-level plugin settings, and one system-level setting. The blog-level settings are:

  • Track Clicks: With this option selected, IdShorts will record each time an entries short url is clicked, and display this value on the edit entry (or page) screen.
  • Short URL Template: This micro-template should be updated to match any custom paths set in your apache rewrite rules. For example, if you limit shorted urls to a /s/ namespace on your server, your Short URL Template value should be <mt:blogurl>/s/<mt:var name='id_shorts_path' />.
  • Append Query Parameter: If Google Analytics is used on your site, this option will be useful to track visits to a page vs visits to a page coming from a shortcode. The query parameter and value utm_medium=go will be appended to the redirected URL.
  • 404 Document: Because IdShorts can be configured (via mod_rewrite) to look for a short url when a file or directory is not found, it can bypass Apache’s ErrorDocument 404 handling. In these (hopefully rare) cases, you can tell IdShorts what file to serve to users to when both a file-system check and a short-url check have failed.

Note that the 404 Document plugin setting exists at both the system and blog levels. A blog-level 404 Document will be loaded, if specified, and the system-level 404 Document will serve as a fall-back. This way, a single 404 at the system level can handle all 404 requests for a multi-blog installation, but a single blog can have a custom 404 or can be served for a different domain, for example.



Creative Commons




Dylan on April 4, 2016, 6:08 a.m. Reply

these are simply great best usb dac under 200$

Giselle Frank

Giselle Frank on May 27, 2017, 6:40 p.m. Reply

Thanks a lot for this wonderful contribution to MovableType. I am new to the service, and actually made by first one recently for my invitation templates. It is clear that you have made a lot of great contributions to the community.

P.S. Your images aren’t coming up.


chendler on April 11, 2017, 11:17 a.m. Reply

Please continue this great work and I look forward to more of your awesome blog posts. download tv shows


binasa on July 14, 2017, 3:17 a.m. Reply

Cross Simulator re-organized to present Settings screen prior to main cross screen. From Feng Qiao Software: Mywe Text expander as a powerful and user-friendly productivity tool helps user work smarter and type less.


binasa on July 14, 2017, 3:18 a.m. Reply

Users simply find out where they want to go, pick and choose the contacts they want to share their directions with if they choose, and get going. In Sluggo, you help a young planet eating worm devour solar system after solar system.


binasa on October 26, 2017, 12:07 p.m. Reply

Simply login and your lists will now synchronize with your Word Tracer app. FAST DOWNLOAD - Less than 23MB, downloadable via 3G! 2.


Samyukta85 on May 16, 2018, 8:43 p.m. Reply

Keep on sharing the useful information.


sachinkumarmtf on June 21, 2018, 8:45 a.m. Reply


cuongnguyenvn on November 17, 2018, 7:20 a.m. Reply

Bluetooth Smart Users Manual v1.1.3 details for FCC ID 2ADCMRSM1 made by Osterhout Design Group.


achraf on January 29, 2019, 6:53 p.m. Reply

Thank you for this amazing plugins here iptv website

Cassandra D. Everhart

Cassandra D. Everhart on October 7, 2019, 5:57 a.m. Reply

Great article, I owe something to my friend who recommended. tree service

Leave a Comment

Dan Wolfgang

Dan is an engineering creative and uses his vast knowledge of the web to solve unique client problems with specialized solutions. Complex or straightforward, his focus is to find the most efficient, functional, elegant, and stable solutions for each project. 10 years in web engineering and 14 more in the print publishing industry give him a special insight to the needs, restrictions, and workflows of content publishers, both traditional and new media. Dan is an active Movable Type community member who has written and contributed to countless plugins including some of the most popular: More Custom Fields, Poll Position, and Asset Image Quality.

Twitter: @danwolfgang