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+.

NEW - Version 1.9 adds 3 new features:

  1. You can now open a redirect link in a new window
  2. You can add a rel=”nofollow” attribute to the link of a redirect
  3. You can completely re-write the URL for the redirect so it takes the place of the default page URL (rewrite the href link).

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.




Screenshots of Admin Edit Panel:

Troubleshooting

  • If you check the box for “Show Redirect URL below” on the edit page, please note that you MUST use the full URL in the Redirect URL box. If you do not, you may experience some odd links and 404 pages, as this option cahnges the Permalink for the page/post to the EXACT URL you eneter in that field. (i.e., if you enter ‘2′ in the field, it will redirect to ‘http://2′ which is not the same as ‘http://yoursite.com/?p=2′).
  • If your browser tells you that your are in an infinite loop, check to make sure you do not have pages redirecting to another page that redirects back to the initial page. That WILL cause an infinate loop.
  • If you are using the new Quick 301 Redirects method to do your redirects, be sure that your Request URL starts with a / and is releative to the root (i.e., http://mysite.com/test/ would have /test/ in the request field).

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: Can I add ‘rel=”nofollow” attribute to the redirect link?
YES! New in 1.9, you can now add a ‘ rel=”nofollow” ‘ attribute for the redirect link. Simply check the “add rel=nofollow” box when setting up the redirect on the page/post edit page. Note – this option is not available for the Quick Redirects method.

Q: Can I make the redirect open in a new window?
YES! New in 1.9, you can now make the redirect link open in a new window. Simply check the “Open in a new window” box when setting up the redirect on the page/post edit page. Note – this option is not available for the Quick Redirects method.

Q: I want to just have the link for the redirecting page/post show the new redirect link in the link, not the old one, can I do that?
YES! New in 1.9, you can now hide the original page link and have it replaced with the redirect link. Any place the theme calls either “wp_page_links”, “post_links” or “page_links” functions, the plugin can replace the original link with the new one. Simply check the “Show Redirect URL” box when setting up the redirect on the page/post edit page. Note – this option is not available for the Quick Redirects method.

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.9 – Added ‘Open in New Window’ Feature. (2/20/2010)
- Added ‘rel=”nofollow”‘ attribute option for links that will redirect. (2/20/2010)
- Added ‘rewrite url/permalink’ option to hide the regular link and replace it with the new re-write link anywhere the link is displayed on the site. (2/20/2010)
- Hid the Custom Field Meta Data that the plugin uses – this is just to clean up the custom fields box. (2/20/2010)
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)



40 Responses to “Quick Page/Post Redirect Plugin”

  1. Cichlid says:

    Awesome, I was looking for something like this the other day. Thank you. This will make my life mucho easier. :)

  2. Jay says:

    I’m using google adwords and sending people to: http://www.crimponby.com . I have an htaccess set up to send them to this page: http://thingstodonearcraterlake.com/lifethroughdogs/books/crimp-on-by/ but I want the url to still read http://www.crimponby.com . Is that possible with your plugin or any other way?

    Similarly, I need http://www.urbangodogs.com to go to http://thingstodonearcraterlake.com/lifethroughdogs/urban-go-dogs-clinic/ but still read http://www.urbangodogs.com

    Thank you!

    Jay

    • dfischer says:

      Jay,
      What you are looking to do is most commonly called domain masking. The plugin will not do that. The easiest way do achieve what you want to do, is to forward the original domains ( crimponby.com and urbangodogs.com ) to the new locations and add masking to it. Generally, when you forward the domain name at the registrar, you can add the masking. Masking means that the original URL will remain in the address bar, but the new site will be displayed in the browser. It uses a frame-set to accomplish the feat, but it is the easiest method. There are a few other ways, but they become complex and I wouldn’t even want to try to explain them in a comment reply.
      Regards – Don

  3. Bill Joyce says:

    I am using a lifestyle theme on a Sacramento real estate home search blog at http://www.Sacramento-Home-Search.com . I like the format of WordPress and this theme, but want some of the homepage menu/icons to load other pages and URL’s beyone Worpress pages.

    It installed and worked perfectly (thank you).

    Question? Is it possible to have the redirect open a new window and load the new window? The original window getting transferred back to the home page? I’m guessing that uisn’t really what a redirect is, but that is the funtionality I’m after.

    Thanks for any help.

    • dfischer says:

      Currently it is not designed that way. The plugin simply ‘redirects’ a URL.
      I will be adding additional functionality in the very near future that will allow for opening the link in a new window.
      Regards – Don

  4. Marion says:

    Hello,

    I left a comment this morning in regards rel=”nofollow”

    I don’t see it anymore so I’m guessing you probably have deleted it, maybe?

    Please maybe if you could help me out on this…I just switched to your plugin….I was using AFlinker which supports rel=”nofollow” but I have to keep going back and forth (no plugin admin inside post)…I really enjoy using your plugin so that’s why I’m hoping maybe you can let me know where to put the rel=”nofollow” functionality in your plugin code(all my links need rel=”nofollow”)

    Regards,
    Marion

    • dfischer says:

      Marion – No, I didn’t delete it, just hadn’t had the time to approve it yet.
      Currently, there is no place to add an “rel=’nofollow’” to the links. The plugin doesn’t work in the same manner as the AFlinker plugin. This one is meant to be quick and simple, so it doesn’t tap into the link creation process of WordPress, but just redirects when it finds a match in the post meta.

      I have decided to add the functionality, but will not be able to do it for about another week or two, so until that point, there is no way to achieve what you want – at least with the plugin.

      • marion says:

        Thanks Don….I’m so looking forward to the upgrade…there’s so much hype about rel=”nofollow” that i just want to make sure that Google won’t strip out my affiliate codes from the target domain e.g company.com/id231 to company.com

        Thank you again for the great plugin…More luck to you

        • dfischer says:

          Marion
          The new version 1.9 that I JUST uploaded, now has this functionality.

          • marion says:

            Thank you Don! I can’t believe it was that quick…btw, the code you use for rel=nofollow inside post, can i use it as well so the Quick Redirect under Tools has the rel=nofollow as well?

            • dfischer says:

              Marion –
              You’re welcome!
              The Quick Redirects function is for redirects that have no page or post created for them, so adding rel=nofollow would not really apply. If you ARE using it to redirect pages or Posts that are in existence (which is perfectly ok), to get the rel=nofollow option, you would have to have the redirect set up in the page or post itself.
              The two features function differently so tying them into the same functionality would increase the overhead created for the redirect – which goes against why I created the plugin in the first place – to be quick and simple with almost no overhead on the site. Every new feature adds a bit more processing before the redirect happens, so I am trying to keep that down as much as possible.

              You are welcome to modify the plugin if you are able. Just remember to rename the folder, the functions and the plugin name as to not cause a conflict, and to make sure changes will not be overwritten in a future update.

              Regards – Don

              • marion says:

                Thanks Don for the info in regards to the overhead…i was actually using the Quick Redirect for some text links i have in my homepage…but i just decided to put rel=nofollow with href since its only a few of them anyways…really great plugin, using it on 3 of my sites already….i see you don’t have donation buttons in your site?

  5. Marion says:

    Hello,

    Could you please point me to the right direction as to where I can place $rel_nofollow = ‘rel=”nofollow”‘; in your plugin php?

    Thank you in advance!

  6. 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.

  7. 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.

  8. Droid says:

    Great plugin:

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

  9. 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

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

  11. 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?

  12. Joe says:

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

    Thanks!

  13. 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.

  14. 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!

  15. 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!

  16. [...] 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 [...]

  17. [...] 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