Current Version: Redirect to Page 1.2
Although not a true plugin, Redirect to Page does have it’s use. Redirect to Page will allow you to link to another site or non-WP page without touching the theme’s files. This is useful for adding things to your top navigational menu bar that WordPress does not manage, such as a forum.
Installation
Extract redirect.php from redirect.zip and upload to your theme’s directory. Your theme’s directory can be found at /wp-content/themes/theme name/.
Usage
Create a new page in WordPress and select the page template as Redirect. Within that new page form scroll down to the custom field section. Add a new key with the key name being redirect, and the value being the URL you want to redirect to.
Download Redirect to Page
Current Version: 1.2
Released: 2006-10-01
Version History
1.2 - Bug Fixes
- Fixes the “OK Redirect” message some users are experiencing.
1.1 - Minor Update
- Optimized Code
- Either redirect or Redirect can now be used as the key name.
1.0 - Initial Release

71 Comments
I am trying to have my Photo page, redirect to my flickr page. If you visit my site, and click photos, you get a weird “ok” then a hyper link to my flickr account. I am using WP 2.0 and K2 r133 Thanks for any help.
It seems like it’s an issue with your server. Instead of passing the OK message silently, it likes to get its point across and prompts you with the successful message. I would talk to your server administrators and see if they know anything more about the issue. The good news is it’s working, it’s just not displaying the intended result.
One more thing. You might want to make sure WordPress is redirecting pages correctly like going to http://www.yourdomain.com/wp-admin/ instead of yourdomain.com/wp-admin/ because this plugin uses the same function that WordPress uses to redirect pages.
It was working before my install of wp 2.0. I was using it with 1.5.2 just fine, same server. I will check my server error log and see if I can find anything out. I will also test more with wp 2.0. Thanks for your input.
Is it possible to make this a timed redirect? And if so, what do I need to edit to accomplish that?
(I’m really clueless on this sort of coding, so I apologize if this is something that is ridiculously simple to most)
Paul - SteelerDirtFreak, give me an example of how the timed redirect would work. It could be done it’s just a matter of what you need to do with it.
We’re wanting to use it on a ministry page, where a visitor would go to the page, read a paragraph about about the couple involved, be told they were being sent to the Donate page, and then be redirected to the mission organization’s main donate page (which is on another server) So I need it to be probably a 15 second delay, or something somilar.
I haven’t tested this, but have a look at this delayed JavaScript redirector. You can simply upload the JavaScript file provided to a location on your site. Then paste the two script lines into the page you want redirected.
Thanks.
This works great!
I was looking for this plugin - and some how accidentaly landed onto your website. Thanks
Works like a charm! Thanks!
Works great - thanks!
Did not work. Hosting is Godaddy.com w/ Wordpress v2.0.4, I get OK confirmation thing like Paul did. Right now using Page-to-Links plugins for now.
its almost a year since Paul raised the issue of the “OK” page and all we get here is a silly reply of “talk to your server administrators” … not really the type of support I would expect in an open source community … has anybody found a fix for this annoying bug … or are we just relying on other plugins?
Peter, I’m sorry if it comes across as I’m not trying to fix this. Paul never reported back his findings and Ronald never responded to my email. I’d be glad to iron out this bug, but I need someone who is experiencing this problem to help me. If you want this fixed, shoot me an email, and we can tackle this bug.
I’ve done some looking into this. Are you using an absolute URL such as http://cavemonkey50.com/code/redirect-to-page/ or are you using a relative URL like /code/redirect-to-page/. Making an attempt to redirect based off a relative URL can cause that message to appear.
Next, how are you inputting the redirect in your custom fields? Are you making sure there are no spaces in your URL?
I just gave the plugin an update. Tell me if that fixes your problem.
Ronald — thanks for your work. The Redirect to Page 1.2 beta actually *does fix the OK problem for me (my server is Apache version 1.3.37 (Unix))
And for sure
– use absolute URL
– no spaces in the URL
Glad to hear it’s working for you. I renamed the 1.2 to a final version. Nothing changed so you don’t have to redownload it. If you ever have any problems again in the future, feel free to ask.
Say needed to say thanks!
You’re the man. Exactly what I needed. I have search & search the web for a solution. Yours won! 
Thanks for the plugin! Works great, does exactly what I was looking for.
I’ve been using Redirect to Page for awhile and find it really useful, thanks for the great work. I recently changed a link from an internal page on my server to an external page, from which I can’t link back to my site. Is there any way to have Redirect to Page incorporate a target=”blank” option?
Unfortunately doug, this is not possible. WordPress and PHP provide no solution for new windows in this context.
Hi,
does this work with WP 2.1.2?
I installed the plugin, but when I try to create a page using the tmplate, the page does not save???
Cheers,
Leroy.
Leroy, I have tested Redirect to Page with WP 2.1.x and it works fine. Can you set other page templates to your pages without issue?
thank you so much..
this is a really good plugin!
thanks man!
I am using WP 2.1.3 and it seems that the page will not save….
Are you able to save other pages not using Redirect to Page?
Yes…I’ve just created this page, http://www.seotier.com/adas/ a few seconds ago..
If you select a temple other than Redirect to Page, will you be able to save?
Also, you are adding a redirect key, correct?
I think I’ve figured out how to do it
I create and save a page with my themes default template and adding a redirect key. And then, I edit the page again..only this time I change the page template to the “Redirect” template 
You shouldn’t have to add the key first, but I’m glad doing so works for you.
Thanks for the great plugin
One more thing, when I saved the page with the redirect template, the page cannot be seen at the Manage Pages panel. The page exists only it cannot be managed or edited without knowing the page id.
Sorry, I really have no clue what’s causing it. I would try disabling some of your plugins and seeing if you happen to have a plugin conflict. Redirect to Page is really only a couple of lines of code, so I don’t see how those lines could cause your problem.
Hi,
This is not working with googlepages.
I want to redirect http://deepandbrij.googlepages.com/ to http://deepandbrij.googlepages.com/home.
Can you suggest me?
Deepak and Brijesh, I have no idea what you’re trying to accomplish. Redirect to Page only works with WordPress blogs. It does not work on Google Pages.
Hi Ronald,
If redirect to page only works with wordpress blogs then what ’bout other blogs. Can you make this clear to me.
Regards,
Vipra
Vipra — read the code of the plugin, understand it and you will learn that the plugin uses a special feature of WordPress, the “postmeta” and how it is handled from within WordPress. Other blogs might have similar mechanisms in place to add metadata to a post and to act on this metadata. You’d have to find out with the “other blog”.
And as to googlepages (Deepak and Brijesh) … isn’t that the default redirection anyway???
vipra, Redirect to Page is a template which was designed for WordPress and only functions on WordPress blogs. And to be even clearer, self-hosted WordPress blogs, not the WordPress.com variety.
However, you can use Redirect to Page on a WordPress blog to redirect to any other page, service, domain, whatever. The page which you redirect to does not have to use WordPress.
Hi,
Im trying to intergrate wordpress blog with website and need pages that reload to different URL.
I have downloaded the zip file and extract the php page.
I dont know how to upload the php page to my theme’s directory. Didnt know you could upload anything apart from pictures.
I can create a new page in WordPress but have no idea how to select the page template as Redirect.
Can you please help?
Lindsay, first off, Redirect to Page only works with self-hosted WordPress installs. Your URL suggestions you’re using WordPress.com, which does not work with Redirect to Page.
If you are using a self-hosted WordPress install, Redirect to Page should be placed in /wp-content/themes/your-theme-name/. You can get to that directory by using a FTP program or your host’s file browser.
Thank you for a great script. It works perfectly. I integrated my tumblr blog into my wordpress one with a link at the top. Thanks again!
Thank you for a such a nice script. It works perfectly. I integrated my tumblr blog into my wordpress one with a link at the top. Thanks again!
Thanks for this fantastic plugin.
I really appreciate the clear and easy instructions, too!
Super duper!
thank you!
Works great - thanks!
Hi……
Thanks lot for this plugins but i’ve trouble. I’ve created a new page, called “Webmail”, from admin area (page_id=60), and have upload the redirect.php file into my theme’s directory >>
/wp-content/themes/aufklarung/
Afterwards, i select the page template as Redirect and added a new key with the key name being redirect (Redirecting to Webmail), and aded the value >> http://mail.aufklarung.org on custom field section and save it. But I get a blank page when I click on “Webmail” page. So, please help me !
Gijet, if you open the plugin file, on line 11 I have the old redirect code. Just remove the comment to the line so it looks like so:
if('' != $redirect) { wp_redirect($redirect); exit; }Then, delete line 12. Hopefully that will work for you. If not, you might be having a weird server issue with your PHP and headers. If that’s the case, you’ll have to contact your host and have them look at the issue.
Hi……
Thanks lot for this plugins but I’ve trouble. I’ve installed redirect.php into my theme directory, tried to create new page with the redirect template and saved the new page.
BUT I didn’t see anything, the code area is blank no instruction inside….
No specific place to write the redirection address.
I’ve tried to remove the line 11 and use the line 12. But nothing happen.
I’m not a specialist… I will be pleased to have some help to solve this clue !
Thanks !!!
Pat have you tried adding a custom field called redirect and adding the URL of the page you would like to redirect to. It’s in the instructions:
Thanks for your help… That’s true, I’ve forgot this step “Add a new key with the key name being redirect, and the value being the URL you want to redirect to.”
searching for a dedicated “redirect” key.
Now it’s working well.
The plugin works great. Is there a way to have the redirected URL open in a new window rather than replace the current window?
Unfortunately, not. Forcing a new window would require Javascript, which most likely would be blocked by about 99% of all popup blockers out there.
Nice plugin, why dont u use a php header location instead of a refresh?
Change:
header(”Refresh: 0;url=$redirect”);
To:
header(”Location: $redirect”);
It makes it so the page doesnt start to load, then redirect - it just auto redirects. I have tested and works fine with me, you can test it by using the members link on my side menu.
I use a refresh so WordPress can still keep track of redirected pages. Many people use statistic plugins and doing a header location would change the page before they have a chance to function.
It is possible.
Adam, as I said above:
That’s sweet and it worked perfectly, thanks!
Very useful, thanks for sharing
Thanks a lot for this. Works great.
am I missing something? I’ve created a new page and chose the redirect page template (after uploading the php file to my themes) but I don’t see any option in the “custom field” at all — I’m not sure how to create a key frame or what I need to do to add the redirect url… help?
thanks!!
oh nevermind! I’m an idiot. - just saw the place to add an item.
works beautifully. thanks for a great plugin!
Great Job, Thank you!
Does this work in 2.3.3?
It doesn’t work in WP v2.3.3 for me.
It worked beautifully for me until I upgraded to 2.5 … and now it doesn’t work
Anxiously awaiting a fix!
Working fine in 2.5 now
What did you change to get it to function? It would be helpful to know if anyone else runs into this problem.
Brilliant! Exactly what I was looking for. Thanks for sharing this. And yes, it works in 2.5!
Not working, I added a page called Portfolio, changed the template to redirect and created the new redirect key with the URL of http://portfolio.busteryork.com and nothing happens when I go to the Portfolio page.
Suggestions? And yes, latest install of WP also.
Ok I’m an idiot, after choosing the new key I clicked “Add new key” instead of just clicking “Save” on the page. Works great, nice work!
9 Trackbacks/Pingbacks
[...] Wordpress Page Template: Redirect to Page This seemed like the perfect solution - to recreate pages, using this page template, with the same names as the old pages and have them forward to the new pages. It turned out not to work for this purpose though, as when creating permalinks Wordpress removes the full stops from page titles. So a new Wordpress page e.g. page_name.html would become page_namehtml (missing the dot). This page template still seems very useful, though, even if not for this purpose, so i’ve included it here. [...]
[...] http://cavemonkey50.com/code/redirect-to-page/Download Redirect to Page 1.2 [...]
[...] première consiste à utiliser “Redirect to Page” [v1.2 - 4.5 Ko] qui est une page php qui vient se glisser dans votre thème et qui permet ensuite, à [...]
[...] Oprette en Redirect-side, ved hjælp af denne lille sag: http://cavemonkey50.com/code/redirect-to-page/ [...]
[...] Page Template: Redirect to Page This seemed like the perfect solution - to recreate pages, using this page template, with the same names as the old pages and have them forward to the new pages. It turned out not to [...]
[...] all actual blog posts, I wanted a simple way to include them in the nav menu in my header. Enter Redirect to Page by Ronald Heft, Jr. (bonus… he’s a Nittany Lion, too!) Redirect to Page will allow you to [...]
[...] and upload the redirect.php file by cavemonkey50 to your theme’s directory (/wp-content/themes/theme [...]
[...] Så har jeg et lille tip, hvis nogen skulle støde ind i problemet. På siden havde jeg brug for at kunne oprette en side i Wordpress som derefter så videreleder til en affalite side med mit link. Det er ikke noget man bare lige gør i Wordpress. Så fandt jeg et lille script man kan smide i sin tema mappe - du kan læse mere på cavemoney50.com [...]
[...] “Redirect to” page template (thanks, Mark): this is actually a page template which does nothing but redirect somewhere else. I use it on the main Going Solo site to create navigation tabs to Lausanne and Leeds which redirect to the other sites. Create a page with the right title, select “Redirect” as the page template, and add a custom field named “redirect” with the destination URL as value. [...]
Post a Comment