WordPress Plugin for Permanent Redirection of Posts - Angsuman’s Permanent Redirector Plugin
Angsuman's Permanent Redirector Plugin
Overview
This plugin allows you to redirect (permanent redirect using HTTP status 301) any of your posts or pages to a different URL.
This enables you to transfer Google rank of your post or page (static page of WordPress) to a new page. Also the new page is displayed in search (Yahoo, Google, MSN etc.) results.
This is valuable when you want to permanently move one or more of your posts or pages to a new location.
The post/page content is not altered.
No configuration is required. Even your GrandMother can use it.
Compatibility
Works on 1.5.x & 2.0 codebase.
Update
For some users the plugin wasn't directly redirecting but bringing up an intermediate page. Brian found a solution to this issue. The plugin has been updated with Brian's fix. If you are facing this problem then you are strongly encouraged to download the new version. Otherwise you may continue with your existing version.
How it works
When a post or static page (in WP context) is fetched (using its permalink) for viewing the plugin checks if the post has a "redirect" custom field set. If it is set then a permanent redirect status is sent to the client/browser indicating that the post has permanently moved to the location (URL) specified in the value of "redirect". So the viewer is automatically moved to the new location.
How to use?
In short to use this (after you have installed and activated the plugin) add a custom field to the post (which you want to redirect) with key redirect and in value give the full URL where you want to redirect to.
It doesn't alter the view in archive, category or home page view.
This plugin is usable only in version of WordPress which supports custom fields for posts. Definitely for WordPress 1.5 and above. I am not sure about earlier versions.
Download
Please read the installation procedure below after you download Angsuman's Permanent Redirect Plugin.
Note: For customization requests or to get other free WordPress plugins provided by us, go to - WordPress Plugins (Free) Developed and Supported by Taragana.Com.

71 Comments
Email this Article


















July 6th, 2005 at 7:26 am
You may also be interested in this plugin - which seems to cover more possible cases where redirection could be useful.
July 7th, 2005 at 12:37 am
I use that plugin too
However what that does is totally different from what this plugin does.
This plugin is useful when you are trying to redirect certain posts/pages in your site to a different permanent location possibly due to a site restructuring or maybe certain posts have become so popular so as to deserve a special hosting with more bandwidth and numerous other use cases.
The plugin you pointed presents user with a single proper url for a content.
Both of these plugins help your SERP.
December 27th, 2005 at 1:45 pm
[...] WordPress Plugin for Permanent Redirection of Posts - Angsuman’s Permanent Redirector Plugin [...]
January 4th, 2006 at 11:45 pm
After updating to WordPress v2.0, redirects via this plugin are bringing up an unformatted page with the title “200 OK”.
The headline on the page says OK and under that it says “The document has moved here”, with “here” a link to the redirect location.
Then there’s a line across the page and the Apache version number and host name and port.
I looked through the WP v2.0 files and see the location of the template_redirect hook this plugin uses has moved to a different file.
Any idea what’s going on?
January 5th, 2006 at 12:02 am
This plugin has been tested with WordPress 2.0 codeline also and it works perfectly.
In your case I strongly suspect the problem is being cause by one of the other plugins that you are using on your site. To find out please disable all other plugins excecpt this one. You will find that this plugin is working fine. Then enable one-by-one your other plugins till you hit the one which is causing this problem.
Let me know.
Technical details: One of your other plugins is possibly writing to the output stream directly (not in an action hook). It could be even because the plugin has a space afer ending ?> tag.
January 5th, 2006 at 12:45 am
Thanks for the quick reply. I deactivated all the other plugins, but I’m getting the same behavior.
Using the LiveHTTPHeaders extension in FireFox, I can see that the server is returning a status 200 in the HTTP header rather than 301, but somehow it’s getting the redirected location right.
Looking at the code, it seems impossible (but then it always does).
January 5th, 2006 at 1:28 am
Can you provide me an example of the post in question?
January 5th, 2006 at 2:53 pm
I did find a blank line at the end of the main index.php file, which I mistakenly didn’t replace when I updated to WP 2.0.
After fixing that, I now get blank pages instead of the Apache redirect. Using httpLiveHeaders, I can see a 200 OK response with a Location that is changed and no html.
Seemingly unrelated, but probably not, is a problem with WP 2.0 permalinks that’s been reported.
WP 2.0 is having problems opening pages more than two “generations” deep when permalinks are turned on. The parents and first children come up ok, but after that you get the 404 page. There’s a report of this in the WP forums here Semi-functional page permalinks in 2.0. I can confirm this problem.
I have my permalinks set to “Date and Name Based”, although for Pages, if you’re using permalinks, you seem to always get http://www.site.com/parent-slug/child1-slug/child2-slug/ etc. At least that’s the URL format that wp_list_pages is providing (and did provide before WP 2.0).
My problem site has a large number of Pages. Using the parent-child feature of pages, there is a multi-level heirarchy of pages and a sitemap that WP builds automatically with wp_list_pages.
I use your redirect plugin to add redundant pages to the sitemap. In other words, if different users might look for a page under different parent names, I add a page that shows up under the step-parent in the site map, but use your redirect plugin to send clicks to the real URL.
Here’s the site map (on a test site) I’m talking about. The first seven links are all redirects, currently bringing up blank pages.
Also, all the links more than two levels deep bring up the 404 page. I could fix this problem by turning off permalinks, but that creates other problems, so I think I’ll wait for a permalink fix from the WP team.
The question is whether that will also fix the redirect problem…
January 5th, 2006 at 6:21 pm
@Tom
From what you are saying there could be other files too which may not have been replaced. It appears you have partially updated with WP 2.0. In that case I would strongly suggest you simply replace all the files and then try again. Because with such errors not only will this plugin fail but others too. If you have custom modifed some core WordPress files then you should manually check them before replacing it over the core files.
I have tested this plugin on a clean installation of WP 2.0 and it works fine. The only reason you are seeing this problem is because either any plugins (which I understand you have disabled them all) or from any core files which you have modified have blank spaces at the end. This has nothing to do with Wp2.0 bug with multiple-level deep pages.
Personally I haven’t upgraded to WP 2.0 nor do I recommend it at this time. It is bug ridden. What more can I say?
January 6th, 2006 at 1:35 pm
After several hours reading posts on permalinks in the WordPress support forum, your articles here on WP 2.0, and php docs on the header() function, I decided to downgrade this particlar site back to 1.5.2. It’s all working fine again.
Here’s some strange behavior: as I mentioned in a previous post, this site’s backup index.php file - the one in the root directory - has a return after the closing ?>, which both the php docs and you have warned me should prevent your plugin from working, but the plugin works under 1.5.2 even with this error.
I searched and searched for something similar under 2.0 and never did find anything.
I really appreciate your help and also your other WordPress comments, posts and plugins. I’m adding your blog to my daily review - had I done this earlier I don’t think I would have tried to upgrade this particular site, which depends on a number of plugins from different sources playing together nicely.
January 14th, 2006 at 7:57 pm
[...] WordPress Plugin for Permanent Redirection of Posts - Angsuman’s Permanent Redirector Plugin -Simple Thoughts - Java and Web Technology Blog (tags: plugin wordpress) [...]
January 24th, 2006 at 10:26 pm
I was having similar problems with redirects showing the “200 OK” and not redirecting properly.
I was able to patch the problem by making this slight (and one would think, unnecessary) change:
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $redirect);
/* ADDED */ header("Status: 301 Moved Permanently");
exit();
So, just added the Status: line.
It’s a strange patch. I knew that the problem was not due to empty lines in PHP plugin files because I added some checks in this plugin to see if headers_sent() was true. It was not.
I got the idea here:
http://us2.php.net/manual/en/function.header.php#53751
Again, it seems like this should not be necessary. In fact, the auth_redirect function that comes with the WP2.0 core works just fine without it, just using the Location: header. It’s possibly someething relating to the plugin architecture… I’m not sure, and I don’t have the energy to dig further at this moment.
January 24th, 2006 at 10:36 pm
Brian,
Thanks for the excellent tip. I will update my plugins with it. After all it cannot hurt
Angsuman
February 5th, 2006 at 10:31 am
I installed your plugin for my 1.5.2 wordpress blog, but I keep getting this error when I go to the webpage.
Fatal error: Call to undefined function: nocache_headers() in /home/content/a/n/t/photodreamer/html/wp-content/plugins/ac_authenticator.php on line 17
Any idea what could be wrong?
February 6th, 2006 at 2:04 pm
Great plugin, thanks a lot.
February 18th, 2006 at 10:06 am
ehm, I find the plugin very interesting, except that I cannot find it. Could you please provide a link? I also went to the db you indicate and couldn’t find it too.
Hmm
Pietro
February 18th, 2006 at 10:12 am
found it! This mac is cool, but it really makes it hard sometimes to distinguish tiny differences in color.
Thanks for the plugin,
Pietro
February 18th, 2006 at 9:37 pm
@Darren
Just comment the line. It will be fine.
April 23rd, 2006 at 10:13 pm
Is there a way to also set the user level?
April 23rd, 2006 at 11:45 pm
Yo! just tried to install your authentication plug in according to directions. WP 2.0.2. When going to the site I get a message that says: Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at mysql. This could mean your host’s database server is down. I Went in and deleted file…still getting same message. I am down completely…any ideas? Greg.
April 28th, 2006 at 12:18 pm
Your site appears to be down. This doesn’t look like a plugin problem. It appears to be a site issue.
May 3rd, 2006 at 10:26 am
Hi, thanks for your nice plugin !
is there a way to change the session timeout ?
apparently, now, once you are logged in, it’s never expiring… not quite secure, when you are logging from a public pc…
thanks in advance
May 3rd, 2006 at 12:30 pm
I am working on a new version of this plugin.
May 25th, 2006 at 10:45 am
How do I keep the original url displayed in the browser? ie. once the redirect takes place I would like the original url to remain visable in the browser.
May 25th, 2006 at 10:18 pm
Mac,
This plugin provides permanent re-direction.
What you are looking for is redirection using a frame.
August 12th, 2006 at 10:11 pm
[...] Did you know that if you use mod rewrite you have to 301 redirect the old url? If you’re using the URL rewrite feature on Wordpress then you have a problem. You have a duplicate content issue! The reason is because you now have 2 urls to the same page. Fortunately, there is a plugin on wordpress called the ” Angsuman’s Permanent Redirector Plugin - WordPress Plugin for Permanent Redirection of Posts“. If the URL’s never get 301 redirected from the natural url to the rewritten url, then there will be a duplicate content issue, and a vulnerablity to a Black Hat SEO attack. [...]
August 31st, 2006 at 12:42 pm
[...] [...]
October 23rd, 2006 at 4:25 am
兼职 翻译 酷发生活搜索
koofaa
October 25th, 2006 at 4:21 am
[...] The comments on this post might help. I see someone else was having the same problems. __________________ Ireland SEO Online Marketing [...]
November 2nd, 2006 at 6:16 am
[...] Angsuman’s Permanent Redirect. Anyone who knows a thing or two about SEO knows the importance of 301 redirects. If you ever have need to move posts or pages around, this plugin makes it much, much simpler to maintain link popularity. [...]
December 7th, 2006 at 11:17 pm
[...] ホームページ:Angsuman’s Permanent Redirector Plugin [...]
December 15th, 2006 at 10:18 am
is there some solution to get to the main site page instead of profile page after login?
thanks
January 2nd, 2007 at 7:55 am
[...] Permanent Redirect by Angsuman Chakraborty - I use this to unify the pages on my main page and my blog by using redirects along with Wordpress’s page system. Click one of the links up top (other than home or articles) and then click the articles link at the top of the main page to see this in action. [...]
January 20th, 2007 at 5:01 pm
Luving your great plugin, however is there a way to have it open in a new window? Thanks.
February 2nd, 2007 at 6:18 pm
Can I use this plugin to redirect a feed? My hosting company doesn’t allow access to my .htaccess file, and I have no other way to get all my subscribers in one place. Thanks!
February 21st, 2007 at 11:40 pm
hello,
I had my ISP install this plugin to the plugin folder and I activated it…but, after I login, I get the following error after logging in:
“The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept
cookies.”
The URL that the system appears to be redirecting to is:
http://arc.iwmi.biz/WordPress/wp-login.php?redirect_to=%2F
Any idea of how I could correct this error?
Thanks!
February 22nd, 2007 at 12:28 am
You are redirecting to a site that most likely requires login / authentication. Please check the url you are redirecting it to.
February 22nd, 2007 at 8:39 pm
This only occurs after I activate the plugin. What happens is when I go to the site (http://arc.iwmi.biz/) i get the login site. After I login, I get that error (message 35, above). BUT, When I change the URL (right in the browser) to http://arc.iwmi.biz/WordPress the system works fine! I’m not quite sure why this is. Is this a redirect problem? If so, how would I correct it and where?
I am on a hosted version of WordPress
February 22nd, 2007 at 9:03 pm
The problem is exactly as I stated before. Even I couldn’t get into the site as it requires login.
After login you can obviously access the site because that’s eaxctly what it requires
This is not a redirect problem; in fact this is not a problem at all. You are probably using a plugin to make the site password protected, like my Authenticated plugin
If you want to make the site accessible to all then you have to disable the plugin. Otherwise your viewers need to have an account on that site in order to access it.
August 30th, 2007 at 2:31 pm
Thank you for your work! i love it
October 2nd, 2007 at 2:52 pm
Hi,
I was wondering if this plugin is compatible with the latest release of Wordpress MU? thanks!
October 25th, 2007 at 11:00 pm
Thanks a lot…
December 15th, 2007 at 2:56 am
thanks for this great and very easy to use plugin!!
January 17th, 2008 at 7:53 pm
thought when I found this plugin it was the answer to all my problems. You see, I’m getting a lot of hits at my free http://blowupyourtv.wordpress.com site, and I want to redirect all those hits to my new site, now that it’s off the free Wordpress blog program.. is there any way to make it so when the blowupyourtv.wordpress.com comes up in google, it automatically redirects to blowupyour.tv?
Thank you!
David
February 5th, 2008 at 4:43 pm
Thanks for this plugin! One suggestion, though: bump the version number. I saw “1.0″ after reading about the HTTP 200 problem, and I assumed I had the unpatched code.
March 31st, 2008 at 5:33 am
looks like the plugin us having issues with 2.5. It is causing a redirect loop that crashes the main page. Anyone else experiencing this?
April 6th, 2008 at 11:24 pm
@ Craig,
I’m having the same problem as well. It kinda sucks because this was the only plugin I can find to lock my blog…
April 17th, 2008 at 8:34 am
@craig & Knight7s
I’m having the same problem with my 2.5 blog. I hope there will be an upddate for the plug-in soon. Otherwise, I will be in great trouble
May 3rd, 2008 at 7:58 am
Yes - I’m having the same problem logging in using FF but I managed to login using IE and disable the plugin - I can now login using FF and IE but need a plugin that gives me back the security. I can’t find anything else either.
May 3rd, 2008 at 8:05 am
Is this working? Using IE now.
May 3rd, 2008 at 8:06 am
Hallelujah
May 6th, 2008 at 7:51 am
[...] It is a password protected site, protected using modified version (ask me if you are interested) of WordPress Authentication plugin. This allows our workforce to communicate with each other as well as see what others are doing. For [...]
May 9th, 2008 at 6:46 pm
[...] Angsumans Permalinks Migration - Permanent redirect for your posts and pages. [...]
May 9th, 2008 at 10:55 pm
[...] Angsumans Permalinks Migration - Permanent redirect for your posts and pages. [...]
June 24th, 2008 at 3:22 pm
sorry, i just posted that comment on the wrong page
September 12th, 2008 at 9:16 am
Great plugin, thanks a lot!!
September 24th, 2008 at 6:10 am
The plugin works great! I was long looking for something this simple for migrating my site to a new domain. I’m running on nginx so other plugins I tried did not work except for this one.
I was about to manually redirect from my vhost’s file if I didn’t see this plugin. Thanks again for sharing it.
September 24th, 2008 at 12:36 pm
Good to know, thanks.
October 21st, 2008 at 10:13 am
Thank you very very much for the RELIABLE plugin! I’ve searched for it the whole night… your plugin just settled everything for me! Simple yet effective! Thanks man! Nice ^^
December 12th, 2008 at 11:25 am
There sure is a lot of stuff on this page. Too bad the download button for the plugin is hidden somewhere I cannot see.
December 21st, 2008 at 5:28 pm
one thing…
i have a post tagged plastic bathroom accessories and have a very high google ranking, now i want to promote http://www.chs-limited.co.uk for this keyword
If i use this plugin, i will also be directing the robots to the webpage so the contecn will change, so the serp will go down even dissapear
am i wrong ?
Thanks
December 23rd, 2008 at 2:03 am
[...] Angsuman’s Permanent Redirector Plugin: Este permite establecer mediante un campo personalizado en cada post que queramos redirigir permanentemente a otra dirección. Muy útil si son solo algunos posts los que queremos corregir. [...]
April 6th, 2009 at 4:10 pm
Can I use this plugin to redirect a feed?
June 30th, 2009 at 3:01 pm
Thanks so much for this awesome plugin! Will review on my blog!
July 15th, 2009 at 4:42 pm
Can you provide me an example of the post in question?
April 26th, 2010 at 8:24 pm
Just came across Angsuman’s Authenticated WordPress Plugin and I’m trying to get it working with WP 2.9.2, but when I login with the plugin activated, it redirects to the correct site URL before immediately redirecting back to the login page. Is there an easy fix for this?
Thanks
April 30th, 2010 at 9:37 pm
very goo this plugin. tanks
June 9th, 2010 at 11:52 am
According to my own monitoring, millions of people on our planet get the home loans from various banks. So, there is a good chance to receive a secured loan in every country.
July 3rd, 2010 at 7:44 am
Thanks a lot for yet another super article. I am always trying to find good WordPress tricks to suggest to my clients. Thanks for creating this article. It’s just what I was trying to find. Truly wonderful post.
July 10th, 2010 at 2:49 am
I want to thank you for another excellent post. I am always on the look-out for good WordPress tips to suggest to my own readers. Thank you for making this post. It’s exactly what I was searching for. Truly phenomenal post.
July 10th, 2010 at 4:39 am
Awesome collection of information! I’m not to technologically savvy but you tell it in English. Thanks very much!