Redirection

Jun 26, 2006 | Tags: apache, htaccess, permalink, plugin, redirect, wordpress | Written by Administrator

download

Download: redirection.zip
Version: 1.7.26
Updated: November 25, 2007
Size: 126.2 KB

Support This Plugin!

While this software is being provided free to use, it takes considerable time to develop and support. If you do find it particularly useful or want to request a feature then consider donating money as an incentive for me to carry on developing it.

Thanks!

I have other plugins too!

Redirection is a WordPress plugin to manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This is particularly useful if you are migrating pages from an old website, or are changing the directory of your WordPress installation.

New features include:

404 error monitoring - captures a log of 404 errors and allows you to easily map these to 301 redirects RSS feed for 404 errors Custom 'pass-through' redirections allowing you to pass a URL through to another page, file, or website. Full logs for all redirected URLs All URLs can be redirected, including ones outside WordPress Redirection methods - redirect based upon login status, redirect to random pages, redirect based upon the referrer!

Existing features include:

Automatically add a 301 redirection when a post's URL changes Manually add 301, 302, and 307 redirections for a WordPress post, or for any other file Full regular expression support Apache .htaccess is not required - works entirely inside WordPress Strip or add www to all your WordPress pages Redirect index.php, index.html, and index.htm access Redirection statistics telling you how many times a redirection has occurred, when it last happened, who tried to do it, and where they found your URL Fully localized

NOTE: If you are upgrading from a previous version then please visit the Redirection options page at least once.

Get the Flash Player to see this movie.

Version History

1.7.26 - Fix RSS update and URL encoding problem 1.7.25 - Fix database problem on some hosts 1.7.24 - Stop problems with mod_security 1.7.23 - Stop FTP log files being picked up, RSS 404 log 1.7.22 - Allow carats in regex patterns, another FastCGI workaround 1.7.21 - Fix activation bug 1.7.20 - Workaround for the FastCGI workaround. Hide canonical options for WP2.3 1.7.19 - Better database installation, better auto-generation 1.7.18 - Add auto-generation for source URL 1.7.17 - Add option to disable 404 logs

Installation

Installation is just like any WordPress plugin:

Download redirection.zip Unzip Upload to redirection directory to /wp-content/plugins on your server Activate the plugin Configure options from Manage » Redirection

Note that you must have a permalinks structure setup through WordPress.

You can find full details of installing a plugin on the plugin installation page.

Usage

A redirection is a way for the web server to tell the browser that a particular page is no longer at the current address, and to indicate where it should go to find the new page. The Redirection plugin allows you to create several types of redirections:

301 - Permanent redirection and the client should use the new URL in the future 302 - Page has been temporaliy moved but the client should continue to use the old URL 307 - A HTTP 1.1 version of 302 to disambiguate certain conditions

In addition you can also create specific 404 pages, as well as 'pass-through' pages.

A redirection is created from the Redirection screen in the administration panel:

Create

You can add as many redirections as you want, and redirections will be displayed in a colourful list:

List

This list can be sorted by any attribute, and can even be manually arranged by dragging and dropping the type. You can save the current order by pressing the 'save order' link. Redirections are processed according to their position, so this will be useful should you require a specific order. You may get a performance benefit by putting your most used redirections at the start of the list.

Pass-Through

Pass-through pages provide the same features as Apache's mod_rewrite, but without requiring either Apache or mod_rewrite, and without requiring .htaccess files. A pass-through URL is a page where the content is retrieved from some other location, but the URL does not change. This other location can be another WordPress post, a file, or even another website.

While you can specify another website as the target for a pass-through page, it should be noted that the contents for this are retrieved by your server, and it is likely that your host will not be very appreciative.

Regular Expressions

Regular expressions can be enabled for all redirections and allow you to specify a pattern, rather than an exact URL. A pattern has the potential to match more than one URL, and so regular expressions give you the ability of reducing a large set of redirected URLs to a small number of patterns.

Explaining regular expressions is beyond the scope of this documentation, and you can find more details elsewhere on the internet.

A couple of examples:

  /blog/(.*) => /$1

This will match any URL that starts with /blog/, and will redirect it to the same URL but without /blog/. For example, /blog/2006/10/01/mypost will be redirected to /2006/10/01/mypost.

  /2006/month_\d+/(.*) => /2006/$1/$2

This will match any URL that starts /2006/month_, and is then followed by a number. This will be redirected to the same URL, but without month_. For example, /2006/month_1/something will be redirected to /2006/1/something.

To replace a single dash in a URL with a space:

  /tags/(.*?)-(.*?) => /tags/$1%20$2

Redirection Methods

Redirection provides ways of adding conditions into a redirection:

Simple redirection - no special conditions Based on login status - redirect to one URL if logged in, and another URL if not Based on referrer - redirect to a URL based upon the referring page One of several URLs - specify a list of URLs and get redirected to one chosen at random Random WordPress post - redirect a randomly chosen post

Redirecting based on referrer

For example, you want to redirect users for /feed/ to /feed2/, unless the user comes from Feedburner. To achieve this you must first create a new redirection item using 'redirect based on referrer'. Once the redirection has been created you can edit it and change the details as follows:

Source URL - /feed/ Referrer - ^feedburner.*$ Referrer regex - yes URL not from referrer - /feed2/

This sets up a rule whereby if the referrer does not match then the user is redirected to /feed2/, otherwise no redirection occurs.

Logs & 404 errors

Every redirected URL is recorded, along with data about the user that visited it. You can view these logs from the administration pages.

Logs

Further log details can be obtained by clicking the date of the log entry. On the 404 error page you can also click the plus icon to copy the URL, ready to create a new redirection.

Options

The options page allows you to configure special features of the Redirection plugin:

Options
Post slug changes - Automatically create a redirection when a post's URL changes index.php/index.html - Automatically strip index.php and index.html from URLs Root domain - Automatically remove or add 'www' to a URL

Developers

Redirection exposes two WordPress filters, allowing you to add additional redirection events through your own plugins:

redirection_first - Passed the current URL before any other redirections redirection_last - Passed the current URL after all other redirections

You can manually redirect, or you can return a Redirection_Item (examination of the code should be sufficient information).

Support

Please direct all support questions to the Redirection support forum. Any support questions left on this page may not be answered.

Bugs & New Features

A full list of all bugs can be found in the Redirection issue tracker.

A full list of all requested features can be found in the Redirection feature tracker.

Help me to save time by reading these instructions!

Please report bugs in the Redirection issue tracker.

Please make feature suggestions in the Redirection feature tracker.

Please direct all support questions to the Redirection support forum.

Share This

Comments (page 36 of 36)

author
Leland :

May 15, 2008 8:43 am

How do I disable the logs? I don't need them. This is absolutely killing my MySQL server.

author
Richard Sumilang :

May 8, 2008 6:46 pm

Thanks for this great plugin, works great!

author
bhina :

May 7, 2008 2:53 am

I tried it on 2.5 and it works just fine. Thanks :D

author
Diego :

May 6, 2008 1:14 pm

Hi,
Any words on upgrading to make compatible with WP 2.5?
Thanks for a great plugin! Cheers,
Diego
http://www.secretia.com

author
Joni Solis (subscriber) :

May 3, 2008 7:36 pm

Yes, pretty please update this WordPress Plugin to work with the latest versions of WordPress! Thank you so much!

author
filex :

May 3, 2008 7:26 pm

Please upgrade this plugin. :)

author
marco :

Apr 30, 2008 4:06 pm

there's a lot of discussion about using /%category%/%postname%/ and how to remove /category/ from WP-URLs in the discussion about 'Advanced Permalinks' (which braeks pagination with this combo), so would this link structure be able to achieve with THIS plugin?

author
Christopher :

Apr 26, 2008 11:36 pm

hi, I saw your example of /blog/(.*) => /$1 to redirect to the permaling without /blog. How can I set it up to add /blog to the now invalid urls? I'm switching from WP to WP-mu and my custom permalink was domain/postname, but MU with subdirectories has domain/blog/postname so everything is broken since /blog is required.

author
Wally :

Apr 21, 2008 1:49 am

Ha! I used your redirection plugin for a good cause. I noticed a "blog reaction" to one of my posts in my dashboard. Out of curiosity I followed the link. Part of my post was there, but there was a link back to my original article. Cool, not a spammer or a plagiarist. But, when I clicked on the link back to my blog (actually, it's a good article I would expect some to follow) I got a 404 error. Uh oh. They had the wrong year (maybe intentionally, maybe not - I'll assume simple fat fingering for now). Well, I hopped into Redirect and fixed it. (Take that spammer - if that's the case).

author
Energy Saving Gadgets :

Apr 19, 2008 5:28 pm

I want to change my permalinks so that they do not include the date of the post. I checked the "create 301 when post slug changes" option, then changed the permalink structure, but all links return a 404. I'm confident this is user error, but would appreciate any suggestions or explanation as to what I'm doing wrong. Thanks.

Pings & Trackbacks

24hblog.net, 2aw.org, 3th.be, 69.89.31.120, InternetMarketingCampus.com, ahtim.com, alosblog.com, alvinwoon.com, ambiencemedia.mav.bz, archgfx.net, bbunker.com, beinstantplatinum.com, birosketchbook.com, blog-op.com, blog.2i2j.com, blog.aplicacionesweb.cl, blog.cfrq.net, blog.gonz0.com.ar, blog.gslin.org, blog.heick.nu, blog.moskjaer.dk, blog.patrickkempf.de, blog.qqss5.cn, bloghelper.is-there.net, blogmunch.com, blogstrokes.com, carlmoeller.com, carrero.es, chenjinghua.net, computer-acquisti.com, contents-magic.com, cyocyo.biz, daibin.info, david.scatigna.it, diggin.org, dogmap.jp, foliovision.com, geoffjon.s423.sureserver.com, gfmorris.com, gouwukuang.cqmmgo.com, grafikdesign.wordpress.com, hackspot.gotdns.com, imknight.net, informaticanetblog.org, internetgeeza.com, jasonpenney.net, joakimandersson.se, katsuwo1.wordpress.com, kinshuksunil.com, madebyglowworm.com, marketingvillage.biz, me.quasidot.com, monetiweb.com, moswald.iirc.at, myliltools.com, n0tablog.wordpress.com, niklasblog.com, noirlecroi.com, nspeaks.com, onlinepresence.blogsailor.com, orrio.cn, perassi.org, photomatt.net, plasticdreams.org, rein.upnl.org, schraegschrift.de, seo.cn58.net, sigt.net, skyphe.org, smartr.cn, strm.se, support.pressharbor.com, tbotcotw.com, techathand.net, tecnologia.blogsya.net, thesocialagent.com, vernfong.com, web2.0master.de, web20.berufswahl-online.de, webmaster.webphp.info, websitetology.com, whoisalejandro.com, wpthemesplugin.com, 3rdbardo.com, 9korn.com, aboutbaiaogu.com, affiliates4u.com, alicejason.cn, andrestoledo.com, antinomian.com, austincounsel.com, bizmemowp.com, bjroi.cn, bloggeries.com, blogmundi.com, blogohblog.com, blogpocket.com, blogtomic.com, bloog.com, bpmbulletin.com, cisday.org, colinzhu.com, comeacross.info, crawlspacemedia.com, cs-internet.de, cssnewbie.com, cydeweys.com, davidlouisedelman.com, daxdesai.com, ditii.com, esoomllub.com, etcis.com, exaquo.com, filination.com, floogi.com, geekissimo.com, geekywood.com, gefledesign.se, ghusse.com, gregory-brine.com, groovyu.com, h4x3d.com, hatch.org, hostsay.cn, jenyburn.com, leoangela.com, linickx.com, makeuseof.com, mamablogga.com, marie-lynn.com, matthiaspospiech.de, maxsailor.cn, miriadz.com, mp3d.com.ar, net-entrepreneur.com, netpond.com, optiniche.com, osxcn.com, pandasmic.com, puzich.com, qbencao.com, raoulpop.com, raproject.com, re-design.de, rehlaonline.com, resux.net, rgblog.net, rklau.com, ryanlineker.com, schester.com, seo-scene.de, seoportal.pl, shamoneymaker.com, skate58.cn, squareoak.com, stalkked.com, stefan-persson.se, stuartanderson.eu, sunfrogservices.com, sunshow.net, superchinois.net, terinea.co.uk, thekidscollegefund.com, theosquest.com, thichnhac.com, turen007.com, u-g-h.com, venukb.com, vikingblogger.com, violinkid.com, webinventif.fr, webmaster-source.com, webmercial.dk, webproworld.com, webregard.de, webxmes.com, windowsobserver.com, wordpresscn.com, wordpressplugin.org, xn--rockbro-r2a.de, yaley.blog.35.com

Leave a comment


XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Help me to save time by reading these instructions!

Please report bugs in the Redirection issue tracker.

Please make feature suggestions in the Redirection feature tracker.

Please direct all support questions to the Redirection support forum.

Home | Software | Terms & Conditions | Sitemap | John Godley © 2008
Close
Social Web E-mail
E-mail It


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser