<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KodeeXII.Net &#187; make short url</title>
	<atom:link href="http://kodeexii.net/tag/make-short-url/feed" rel="self" type="application/rss+xml" />
	<link>http://kodeexii.net</link>
	<description>Hadee Roslan’s Ramblings on Technology, Mindset and Methodology to Build A Successful Online Business.</description>
	<lastBuildDate>Tue, 29 Nov 2011 10:47:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<atom:link rel='hub' href='http://kodeexii.net/?pushpress=hub'/>
<cloud domain='kodeexii.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
	<!-- google_ad_section_end --><!-- google_ad_section_start -->	<item>
		<title>Make A Short URL Of Your WordPress Posts And Pages &#8211; Short Tutorial</title>
		<link>http://kodeexii.net/make-short-url-wordpress-short-tutorial.html</link>
		<comments>http://kodeexii.net/make-short-url-wordpress-short-tutorial.html#comments</comments>
		<pubDate>Sat, 29 Aug 2009 08:20:09 +0000</pubDate>
		<dc:creator>kodeexii</dc:creator>
				<category><![CDATA[Computer Technology]]></category>
		<category><![CDATA[make short url]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://kodeexii.net/?p=1103</guid>
		<description><![CDATA[Make Short URLs of your Wordpress posts and pages on your own domain. You don't need to install any plugins nor programs on your hosting. Follow this tutorial. Just copy and paste into two files and you will automatically have your own short urls automatically created by Wordpress.]]></description>
			<content:encoded><![CDATA[<div id="attachment_1123" class="wp-caption alignright" style="width: 250px"><img class="size-medium wp-image-1123 " title="Wordpress Short URLs" src="http://kodeexii.net/wp/wp-content/uploads/2009/08/wordpress-url-300x300.png" alt="Wordpress Short URLs" width="240" height="240" /><p class="wp-caption-text">Wordpress Short URLs</p></div>
<p>One week ago, one of the many URL shortening service provider, <a  target="_blank" title="TR.IM shutting down URL Shortening Service" href="http://blog.tr.im/post/159369789/tr-im-r-i-p">tr.im, announced that they are shutting down</a>. Services like <a  target="_blank" title="TR.IM Your URLs" href="http://tr.im">tr.im</a>, <a  target="_blank" title="A Simple URL Shortener" href="http://bit.ly">bit.ly</a>, <a  target="_blank" title="Free Short URL Redirects With No Ads" href="http://shorturl.com">shorturl</a> and <a  target="_blank" title="Shorten That Long URL Into Tiny URL" href="http://tinyurl.com">tinyurl</a> have become important since Twitter came about. Admittedly, to many people, the shutting down of just one provider is nothing to worry about. There are still many others out there.</p>
<p>Still, the closing of tr.im does bring about the question of how long before others shut down too? What will happen to all the short urls already created? Well, simply said, they will no longer work to bring visitors to the desired destination.</p>
<h2>The Problem To Those Who Use Short URLs Extensively</h2>
<p>Many people, especially Internet Marketers make use of short urls for various reasons. Internet Marketers are the ones who will probably be effected the most with the shutting down of Short URL sites. When the service goes down, so does all the short links.</p>
<p>Do you have a large number of tiny urls generated for you? Have you posted them in various websites to bring traffic to your domain? Guess what.. You will have to generate new tiny urls. You will also have to edit all your postings, if you can, and put in the new short urls you&#8217;ve created. Otherwise, you&#8217;ll certainly lose all the traffic you&#8217;ve enjoyed in the past from the short urls you&#8217;ve created.</p>
<h2>Make Short URLs Using WordPress On Your Own Domain</h2>
<p>If you use WordPress as your website or blogging platform, you&#8217;re in luck. You can configure WordPress to generate Short URLs automatically. All that&#8217;s needed is a few lines of code which you can copy and paste into your themes and htaccess.</p>
<p>The following short tutorial will configure WordPress to generate short urls using the post and page id &#8211; <strong>yourdomain.com/b/post-id</strong> for blog posts and <strong>yourdomain.com/p/page-id</strong> for pages.</p>
<p>Let&#8217;s get directly to the codes. First, copy these into your<strong> .htaccess file</strong></p>
<p>{code type=xml} # BEGIN WordPress<br />
&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine On<br />
RewriteBase /<br />
RewriteRule ^b/([0-9]+)$ /index.php?p=$1 [QSA]<br />
RewriteRule ^p/([0-9]+)$ /index.php?page_id=$1 [QSA]<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]<br />
&lt;/IfModule&gt;<br />
# END WordPress<br />
{/code}</p>
<p>Next, you will need to edit one your theme file &#8211; header.php and insert the following lines</p>
<p>{code type=php}</p>
<p>&lt;?php if(is_single()) { ?&gt;<br />
&lt;link rel=&#8221;shortlink&#8221; href=&#8221;&lt;?php bloginfo(&#8216;home&#8217;) ?&gt;/b/&lt;?php the_ID(); ?&gt;&#8221; /&gt;<br />
&lt;?php }?&gt;<br />
&lt;?php if(is_page()) { ?&gt;<br />
&lt;link rel=&#8221;shortlink&#8221; href=&#8221;&lt;?php bloginfo(&#8216;home&#8217;) ?&gt;/p/&lt;?php the_ID(); ?&gt;&#8221; /&gt;<br />
&lt;?php }?&gt;</p>
<p>{/code}</p>
<p>The code above will insert the shortlink meta tag into your webpages. This meta tag will be used by services like Twitter to determine the short url to use fro your web page. Twitter will now use the short url indicated by this meta tag instead of generating a new url for your page.</p>
<p>The place to insert the code above is within your themes <strong>&lt;head&gt;&lt;/head&gt;</strong> space. There should be a WordPress Loop in there. Just insert the Php code above somewhere in between the loop.</p>
<p>That&#8217;s all there is to it. After you&#8217;ve added the above codes into place, your wordpress installation will generating your short urls for you automatically. You no longer need any third party URL Shortening Services. Your short urls will be available as long as your site is up.</p>
<h2>The Shortcomings Of A WordPress Generated Short URLs</h2>
<p>Not everything is fine and dandy with hosting your own Short URLs with WordPress. As with anything in life, generating your own short url with WordPress do have its downside. Lets take a look at a few of them which I can think of right now.</p>
<ol>
<li>Lack of statistics. If you are of the type that likes to have statistics on your Short Links, you will probably not like this.  I don&#8217;t think there will be any statistics available for this type of Short URL implementation.</li>
<li>Cannot insert special code. Most third party URL Shortening Services allows you to insert special codes or notes to the generated short urls. This is not possible with this method. This method does not allow any input from you part. Short URL is generated using post and page id respectively.</li>
<li>You can only shorten links for posts and pages hosted in the WordPress environment. If you want to shorten pages external to WordPress, you can&#8217;t with this method.</li>
<li>Should you somehow have to rebuild your WordPress  installation from an XML export of your current site, you will lose your old shortened links. WordPress generates new ids for your imported posts and pages.</li>
<li>Of course, your domain name should be relatively short for this to be effective. If your domain name is like thisisasampleofaverylongdomainname.com, then it&#8217;s best to just use the many third party URL Shortening Services.</li>
</ol>
<h2>For Those Who Don&#8217;t Deal With Coding Your Own URL Shortener</h2>
<p>If meddling with your .htaccess and WordPress header theme files is not your cup of tea, then you can go the WordPress plugin way of doing the same thing. Yes, there are quite a few plugins out there on the net for WordPress that will enable you to shorten your urls.</p>
<p>Among the few which I&#8217;ve tested are:</p>
<ul>
<li><a  target="_blank" href="http://www.harleyquine.com/php-scripts/short-url-plugin/">Short URL Plugin</a></li>
<li><a  target="_blank" href="http://hjacob.com/blog/2009/06/short_url_shortcode_wordpress/">Short URL Generator</a></li>
<li><a  target="_blank" href="http://redmine.sproutventure.com/short-post-urls">Short Post URLS</a></li>
<li><a  target="_blank" href="http://www.iron-feet.cn/it/wordpress-plugincustom-url-shorter/">Custom URL Shorter</a></li>
<li><a  target="_blank" href="http://code.google.com/p/shortlink/">Short Link</a></li>
<li><a  target="_blank" href="http://whomwah.github.com/revcanonical/">RevCanonical</a></li>
<li><a  target="_blank" href="http://nikolay.com/projects/wordpress/shorturl/">ShortURL</a></li>
<li><a  target="_blank" href="http://www.splicelicio.us/get-shortlink-wordpress-plugin">Get ShortLink</a></li>
</ul>
<p>Yes, I&#8217;ve installed and tested the plugins above. However, in the end, I decided to go without any of them. Why? Not because the plugins are not good or anything. I just wanted to minimize the number of plugins I have installed on my WordPress installation. Since the coding is not too difficult, I decided to run without plugins.</p>
<h2>Another URL Shortening Alternative</h2>
<p>If you want to host your own URL Shortener and require more functions than what WordPress is capable of providing, then the following are a couple of alternatives you have.</p>
<ol>
<li>Install <a  target="_blank" title="Your Own URL Shortener (and a WordPress plugin)" href="http://yourls.org/">YOURLS </a>on your hosting server. YOURLS is a server based web application. You can basically just install it into your domain hosting account and run it there.</li>
<li>Build your very own URL Shortening application. I found an interesting basic guide on this on the net. If you feel like jumping into Php codes and SQL queries, head on over to <a  target="_blank" title="Tutorial: How To Create Your Own URL Shortener" href="http://sean-o.com/short-URL">Sean-O&#8217;s URL Shortener Tutorial</a>.</li>
</ol>
<p>URL Shortening Services are here to stay. Even if Twitter currently favors bit.ly to shorten URLs submitted to them, other Shortening Service Sites will probably continue to function as usual. Want to know how important a shortening service is? Well, users of tr.im have managed to make the owners of tr.im to go back on their decision to shut down tr.im. They are now making <a  target="_blank" title="tr.im to be Community-Owned" href="http://blog.tr.im/post/165049236/tr-im-to-be-community-owned">tr.im a community owned project</a>.</p>
<p>Do you use URL Shortening Services? Have you thought about what will happen to your short links if the provider goes under?</p>
<p>The Short URL for this post is:  <a title="Short URL To Post - Make A Short URL.." href="http://kodeexii.net/b/1103 " target="_self">http://kodeexii.net/b/1103 </a></p>
<p>That&#8217;s certainly way shorter than the original url: <a  title="Long URL to post - Make A Short URL.." href="http://kodeexii.net/current-events-computer-technology/make-short-url-wordpress-short-tutorial.html" target="_self">http://kodeexii.net/current-events-computer-technology/make-short-url-wordpress-short-tutorial.html</a></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Make A Short URL Of Your WordPress Posts And Pages &amp;#8211; Short Tutorial on KodeeXII.Net',url: 'http://kodeexii.net/make-short-url-wordpress-short-tutorial.html',contentID: 'post',code: 'Hade2895',suggestTags: 'make short url,tutorial,wordpress',providerName: 'KodeeXII.Net',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://kodeexii.net/wp/wp-content/plugins/wp-evernote-site-memory/img/smallclip.png" class="evernoteSiteMemoryButton" /></a>
				<p class="evernoteSiteMemoryDescription">
					<strong>Evernote</strong> lets you save all the interesting things you see online into a single place. Access all those saved pages from your computer, phone or the web.  <a  href="https://www.evernote.com/Registration.action" title="Sign up for Evernote" target="_blank">Sign up now</a> or <a  href="https://www.evernote.com/about/learn_more/" title="Learn more about Evernote" target="_blank">learn more</a>. It's free!
				</p>
				
				<div class="evernoteSiteMemoryClear">&nbsp;</div>
			</div>]]></content:encoded>
			<wfw:commentRss>http://kodeexii.net/make-short-url-wordpress-short-tutorial.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	<!-- google_ad_section_end --></channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 74/88 queries in 1.939 seconds using disk: basic
Object Caching 964/978 objects using disk: basic

Served from: kodeexii.net @ 2012-02-11 17:08:46 -->
