Quick Page/Post Redirect Plugin

Quick Page/Post Redirect plugin redirect Pages or Posts to another location quickly.

It adds an option box to the page or post edit section where you can specify the redirect location and type of redirect that you want, temporary, permanent, or meta. The redirect Location can be to another WordPress page/post or any other website or external URL. It allows the use of a full URL path, post or page ID, permalink or page-name. This plugin is for WordPress version 2.5+.

As of version 1.8, additional 301 Redirects can also be added for non-existent posts or pages – helpful for sites converted to WordPress where you don’t have the ability to edit the htaccess file.  Updated 12/28/2009.




Screenshot of Admin Edit Panel:

screenshot

Troubleshooting

Why is my Page/Post not redirecting?
If your page or post is not redirecting, this is most likely because something else like the theme functions file or another plugin is outputting the header BEFORE the plugin can perform the redirect. This can be tested by turning off all plugins except the Quick Page/Post Redirect Plugin and testing if the redirect works. 9 out of 10 times, a plugin or bad code is the culprit.

If you are using the new Quick 301 Redirects method to do your redirects (new with version 1.8), be sure that your Request URL starts with a / and is relative to the root (i.e., http://mysite.com/test/ would have /test/ in the request field).

We have tested the plugin in dozens of themes and a whole lot more plugins. In our experience, (with exception to a few bugs) most of the time another plugin is the problem. If you do notice a problem, please let us know at plugins@fischercreativemedia.com – along with the WP version, theme you are using and plugins you have installed – and we will try to troubleshoot the problem.

Frequently Asked Questions

Q: First Question – Why another redirect plugin?

I know, there are already a ton of redirect plugins out there for WordPress – and I have tried so many. Some are really good like Redirection from Urban Giraffe, with a ton of bells and whistles, and others that are borderline junk – or just so out of date that they no longer work correctly. I know that. But when I recently had a client come to me and ask, “Why can’t I just send this page to that page for a few weeks, and switch it back later when I am ready?”, I got to thinking – yeah, why can’t you?

Most WordPress site owners don’t know or care enough about 404 tracking to need it (thats a webmasters job), they don’t want to have to adjust the .htaccess file (or do I presume they would know how – not to mention the nightmare of fixing it when the site stops working). And who the heck knows what I am taking about when I mention a Conical URL – I start to fall asleep just thinking about it myself? They just need something quick and something simple – and I couldn’t find that in a plugin – at least one that worked anyway. So that is how this plugin was born – another redirect plugin. Something that you or I or anyone capable of making a post or page in WordPress can use.

Q: What would I use it for?

Good question. Ever had a page that you have published but then decide to change? What about when you are working on the edits to that page? If you set it back to a draft status, anyone with a link to that page now gets a 404 error (page not found). If it is going to take you more than a few minutes to edit the page (I have taken weeks to get around to editing), and you have a busy site, that could be a problem. Why not direct them to a maintenance page or the home page instead? At least while you are working on the page. Leave it published, redirect it someplace else while you edit, and you’re good to go. One thing to note is that the Page or Post needs to remain published for the redirect to happen – so this may not be the most ideal case for a post if you list it on a blog page. It will still be visible in the blog under that scenario.

Another use could be if you have a page that is a parent, but have a bunch of sub pages under it. Well it looks great on the navigation menu of your site, but you don’t need any content on the page – you just want it to be one of the sub pages. You can redirect the parent to whatever sub you want to be the page that shows when they click that item on the navigation menu. In fact, I have needed to do just that on many custom themes. This makes it super easy to do.

One other use that I have come across, is a client of mine that has a site where they run contests all the time. They wanted a nice URL for this (like http://mysite.com/enter-to-win/). This was the fastest and quickest way to do just that. We set up a page called `enter-to-win` and then just redirected it (302 temporary) to a post with whatever whatever contest was this week’s contest focus. No need to fool with htaccess file, no sub-domain to set up, no need to constantly change the enter-to-win page with a link to enter the contest – it just takes them to the contest post that the site owner wants them to go to. The best thing is – it only takes them about 10 seconds to do it.

Q: Do I need to have a Page or Post Created to redirect?

Not any more! With 1.8, a new feature was added that allows you to create a redirect for any URL on your site. This is VERY helpful when you move an old site to WordPress and have old links that need to go some place new. For example, If you had a link on a site that went to http://yoursite.com/aboutme.html you can now redirect that to http://yoursite.com/about/ without needing to edit the htaccess file. You simply add the old URL (/aboutme.html) and tell it you want to go to the new one (/about/). Simple as that.

The new functionality is located in the Admin under Settings/Quick Redirects. The old URL goes in the Request field and the to new URL goes in the Destination field. Simple and Quick!

Q: I have Business Cards/Postcards/Ads that say my website is http://something.com/my-name/ or http://something.com/my-product/, can I set that up with this?

YES! Just set up a redirect (see above) and set the Request field to /my-name/ or /my-product/ and the Destination field to the place you want it to go. The destination doesn’t even need to be on the same site – it can go anywhere you want it to go!

Q: What the heck is a 301 or 302 redirect anyway?

Another good question!
The number corresponds with the header code that is returned to the browser when the page is first accessed. A good page, meaning something was found, returns a 200 status code and that tells the browser to go ahead and keep loading the content for the page. If nothing is found a 404 error is returned (and we have ALL seen these – usually it is a bad link or a page was moved). There are many other types of codes, but those are the most common.

The 300+ range of codes in the header, tells the browser (and search engine spider) that the original page has moved to a new location – this can be just a new file name, a new folder or a completely different site.

A 301 code means that you want to tell the browser (or Google, bing, etc.) that your old page has permanently moved to a new location. This is great for search engines, because it lets them know that there was a page there once, but now to get to it, you need to go to the new place where it is located. They even update their old link to it, so future visitors and searchers will not have to go through the same process and try to visit the old link.

A 302 or 307 code tells the browser that the file was there, but TEMPORARILY it can be found at a new location. This will tell the search engines to KEEP the old link in place because SOMEDAY it will be back at the same old link. There is only a slight difference between a 302 and a 307 status. Truth is, 302 is more widely used, so unless you know why you need a 307, stick with a 302.

Q: So, which one do I use?

The easiest way to decide is this: If you want the page to permanently change to a new spot, use 301. If you are editing the page or post and only want it to be down for a few hours, minutes, days or weeks and plan on putting it back with the same link as before, then us 302. If you are having trouble with any redirects – or just prefer them, you can use a `meta` redirect. The meta redirect actually starts to load the page as a 200 good status, then redirects using a meta redirect tag.

Just be careful in all cases to NOT redirect the page back to itself – or you will end up in a vicious and endless redirect loop, and probably send your browser into a tizzy!

Still not sure?
Try 302 for now – at least until you have a little time to read up on the subject.

Q: Should I use a full URL with “http://” or “https://”, or can I use “www.domain.com” or just a page number ?

You can use the full URL, but you do not always need to. If you are redirecting to an external URL, then yes, use http or https protocol – you can use “www.” without http, but it is advised to use the URL including the protocol (http or https) – and subdomains may cause the redirect to act weird – so in that case, use it all.

If you are just redirecting to another page or post on your wordpress site, then no, it is not needed.

When in doubt, use the entire URL.

Version info:
1.8 - Added a new 301 Redirect Page to allow adding of additional redirects that do not have Pages or Posts created for them. Based on Scott Nelle’s Simple 301 Redirects plugin.(12/28/2009)
1.7 – Small fix to correct the Meta Redirect – moved “exit” command to end of “addmetatohead_theme” function. And also fix Page redirect. (9/8/2009)
1.6.1 – Small fix to correct the same problem as 1.6 for Category and Archive pages (9/1/2009)1.6 – Fix wrongful redirect when the first blog post on a blog page has a redirect set up – was redirecting the entire page. (9/1/2009)
1.5 – Re-Write plugin core function to hook WP at a later time to take advantage of the POST function – no sense re-creating the wheel. You now can have page/post as draft and still redirect – but ONLY after the post/page has first been published and then re-saved as draft (this will hopefully be a fix for a later version). (8/31/2009)
1.4 – Add exit after header redirect function – needed on some servers and browsers. (8/19/2009)
1.3 – Add Meta Re-fresh option (7/26/2009) First Public Release.
1.2 – Add easy Post/Page Edit Box (7/25/2009)
1.1 – Fix redirect for off site links (7/7/2009)
1.0 – Plugin Release (7/1/2009)



20 Responses to “Quick Page/Post Redirect Plugin”

  1. Duong says:

    Hi there,

    I am using your plugin right now because I want tp redirect posts to my pages. But can I redirect multiple posts to one page? The blog that im talking about is my website: http://www.kadu.nl/udong

    thanks

    • dfischer says:

      You can redirect as many posts as you want to any page you want – you just need to set them up for each one separately.

  2. Jennifer says:

    Thank you so much. This is the best thing ever. Especially when you set up multiple iterations of Wordpress on the same domain.

  3. Droid says:

    Great plugin:

    However it doesn´t seem to work in the latest version of firefox.

  4. Simon says:

    Great plugin – thankyou. Quick question – will the page impressions still show up in Statcounter and Google Analytics – or does the redirect code run before the analytics code has a chance to ‘fire’?
    Thanks again,
    Simon

    • dfischer says:

      Simon – thanks!
      The redirect happens before any content on the page is loaded, so Google Analytics will not count the page. That also applies to Statcounter or any other tracking methods.
      Regards – Don

  5. OMG … AWESOME … I needed this! Works perfectly … THANK YOU SO MUCH

  6. I’ve been using your Quick Page Redirect script and it is working good. But the only problem is whenever I redirect to another page on the same server (under wordpress but in the gallery folder), the menu link for that page does not stay active. Is there a way to solve this?

    • dfischer says:

      Therese,
      Whet do you mean the link for the page does not stay active? Does the page become a draft or does it just stop re-directing?

  7. Joe says:

    This was exactly what i needed. It’s simple and to the point!

    Thanks!

  8. Andrew says:

    Great plugin, I would love to have the option of defining whether the plugin redirects in the same window or in a new ‘blank’ window. Please add this option! Thanks for a great plugin.

  9. Chris says:

    Interesting plugin! I would love to use it, if the plugin could keep track of users by cookies. What I mean is this:

    When the users first reach my site, they will have to choose between two categories of interest. Let’s say film or books. This choice will be saved in a cookie and they don’t need to choose again.

    The next time they go to my site, depending on their choice (the cookie) they will be auto-redirected to either the start page for books or the start page for films.

    Can your plugin be customized to do this or is there another one perhaps?

    Many thanks!

    • dfischer says:

      Thanks Chris!
      We will definitely consider creating a plugin that does this in the future. This would be more of a “Landing Page” type plugin, not really a redirect plugin – and a quick search did not really find one that does exactly what you are looking for, so if anyone has any ideas, please let us know!

  10. Kim says:

    Awesome! This just made my life so much simpler! I’ve been hacking code to redirect and I’m not a coder :-) Thanks again!

  11. [...] like this example I made using the Quick Page/Post Redirect plugin for Wordpress. It’s a 302 redirect to the shared stuff on my [...]

  12. [...] Fischer Creative Media Quick Page/Post Redirect PluginI hadn’t really thought of this, but having a redirect plugin is a pretty good idea. Vanity URL’s and such. [...]

Leave a Reply