Title: RevCanonical
Author: whomwah
Published: <strong>14 เมษายน 2009</strong>
Last modified: 15 ธันวาคม 2009

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/revcanonical.svg)

# RevCanonical

 By [whomwah](https://profiles.wordpress.org/whomwah/)

[Download](https://downloads.wordpress.org/plugin/revcanonical.1.2.6.zip)

 * [Details](https://th.wordpress.org/plugins/revcanonical/#description)
 * [Reviews](https://th.wordpress.org/plugins/revcanonical/#reviews)
 *  [Installation](https://th.wordpress.org/plugins/revcanonical/#installation)
 * [Development](https://th.wordpress.org/plugins/revcanonical/#developers)

 [Support](https://wordpress.org/support/plugin/revcanonical/)

## Description

RevCanonical generates a short url for your pages, as well as adding [link shortening discovery](http://laughingmeme.org/2009/04/03/url-shortening-hinting/).
You can use this url on character restricted sites like [Twitter](http://twitter.com),
in IM, or anytime you need a short link to your webpages. The discovery part means
that other sites and [services](http://revcanonical.appspot.com/) can also use the
short url should they need it. Oh and this short url is yours, from your website.
It does not use any external service.

Here’s what gets added to your pages. The link in the href is the short version 
you can use:

    ```
    <link rev="canonical" type="text/html" href="http://my-domain.me/p12p" /> 
    ```

This tag can though be customised to suit your own preferences (at your own risk),
for instance this:

    ```
    <link rel="shortlink" href="http://my-mini.me/p12p" /> 
    ```

That’s it! You can now, not only use this url to pass around, and in sites like 
[Twitter](http://twitter.com) without having to go via a url shortening service,
but [services](http://revcanonical.appspot.com/) or people that understand the rev
=canonical link tag, will be able to use this shortened version over the longer 
canonical version. It also means that it’s persistence is down to you, and not to
a 3rd party.

Oh and there’s [a great bookmarklet](http://simonwillison.net/2009/Apr/11/revcanonical/)
that makes hunting for existing short urls on a page really simple. You can read
more about this plugin at my website http://littl.me/p136

NOTE: I use the Day and name style permalinks in WordPress. I can’t be sure the 
plugin will work if you use other formats.

What’s changed? View [the CHANGELOG](http://github.com/whomwah/revcanonical/raw/master/CHANGELOG)

### Advanced

The default settings should suit most people, but if there are a couple of things
you can change should you wish. There are also a few tags you can use within your
own pages.

If your domain name is a bit long and you own a smaller domain you would like to
use as your shortened domain, you can add this in the settings page. You would then
just need to make sure that the new domain pointed to the original via a ProxyPass
setting.

There are many ongoing conversations on the web about how to describe shortened 
links in HTML. There appears to be no absolute right way, so by default if will 
be rev=canonical. Should you want to use another way, you can also change this via
the settings page.

And finally… there are a couple of tags you can use in your own templates, that 
will return the short link for that page. You need to pass them the post ID.

    ```
    <?php get_revcanonical_link($post->ID) ?> ===> Echo the shorturl to the screen

    <?php $url = revcanonical_link($post->ID) ?> ===> Assign the shorturl to a variable
    ```

## Installation

This section describes how to install the plugin and get it working.

 1. Upload `revcanonical.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## FAQ

  I just get a ‘404 page not found’ when going to the shortlink?

A few people have mentioned this, but due to the fact they were unable to send and
debug information, I have not been able to fix it. It is likely to be a configuration
setting on shared hosting or hosting on Windows. If you are having this problem 
and would be prepared to help debug, please drop me a line at duncan [at] whomwah[
dot] com

  Does it work with earlier versions of WordPress?

Not sure is the simple answer, I currently run 2.8. If it works with ealier versions,
please let me know via [Whomwah.com](http://whomwah.com).

  But my domain name is really long

You can add you own shortened domain name if you own one via the settings page. 
This is for advanced users, as it’s up to you to point your shortened domain back
to the longer one. I do this via a ProxyPass line in that domains conf file. Here’s
my vhost.conf file. You can find out more about ProxyPass via the [Apache website](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass).

    ```
    <VirtualHost *:80>
      ServerName  littl.me 
      ServerAlias www.littl.me
      ProxyPass / http://whomwah.com/
    </VirtualHost>
    ```

  Can I contribute to revcanonical?

Sure, the code lives at the [Revcanonical github project page](http://whomwah.com/revcanonical).
You can download or fork it there.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“RevCanonical” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ whomwah ](https://profiles.wordpress.org/whomwah/)

[Translate “RevCanonical” into your language.](https://translate.wordpress.org/projects/wp-plugins/revcanonical)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/revcanonical/), check
out the [SVN repository](https://plugins.svn.wordpress.org/revcanonical/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/revcanonical/) by
[RSS](https://plugins.trac.wordpress.org/log/revcanonical/?limit=100&mode=stop_on_copy&format=rss).

## Meta

 *  Version **1.2.6**
 *  Last updated **16 ปี ago**
 *  Active installations **10+**
 *  WordPress version ** 2.6 or higher **
 *  Tested up to **2.8.6**
 *  Language
 * [English (US)](https://wordpress.org/plugins/revcanonical/)
 * Tags
 * [links](https://th.wordpress.org/plugins/tags/links/)[post](https://th.wordpress.org/plugins/tags/post/)
   [revcanonical](https://th.wordpress.org/plugins/tags/revcanonical/)[shortening](https://th.wordpress.org/plugins/tags/shortening/)
   [simple](https://th.wordpress.org/plugins/tags/simple/)
 *  [Advanced View](https://th.wordpress.org/plugins/revcanonical/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/revcanonical/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/revcanonical/reviews/)

## Contributors

 *   [ whomwah ](https://profiles.wordpress.org/whomwah/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/revcanonical/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://pledgie.org/campaigns/3803)