WordPress.org

Ready to get started?Download WordPress

Forums

Redirectify Plugin Update for WordPress 2.0? (27 posts)

  1. unknown
    Member
    Posted 8 years ago #

    Hi folks, maybe someone here can help me. I posted about this problem four days ago on the Red Alt Support Forum (the author of the Redirectify plugin's own forum), but he has yet to respond or offer any assistance whatsoever, so maybe someone here can help... Here is what I posted:

    I've had Redirectify on my WordPress blog and it was working great... until I just updated to latest version of WordPress (2.0). Now, when I click on a previously redirected link, instead of taking me to the page, I get a blank white page with "OK" at the top and "The document has moved here" with "here" being a link to the page it was supposed to be redirecting to. Is there an update in the works for Redirectify for WordPress 2.0 that will correct this? Or is there a patch available that will fix this so my users won't run into that "OK" page?

    Any help appreciated!

    Thanks,
    kopper
    http://www.garagepunk.com

    (To test it, click on the either the "GaragePunk Forums" or "GaragePunk Podcast" link in the menu in the header of my blog.)

  2. Kafkaesqui

    Posted 8 years ago #

    Hmm. That appears to be the server providing the HTTP status response (200 OK) page.

    If everything else has stayed the same, I can't say why this would happen. However, I can suggest a change to the plugin which *may* work around anything WordPress may be doing.

    In redirectify.php (either through the plugin editor, or offline in a text editor), look for the following line:

    wp_redirect($redirect);

    Comment this out and add a new line:

    // wp_redirect($redirect);
    header("Location: $redirect");

    I'm not seeing anything all that different in the wp_redirect() function, but if the above works...

  3. peibul
    Member
    Posted 8 years ago #

    Same problem... and I can't find redirectify.php.

    Please help!

  4. Kafkaesqui

    Posted 8 years ago #

    "I can't find redirectify.php"

    It's the plugin file. In the plugins directory. Under WordPress' plugin editor it would be called...Redirectify.

  5. unknown
    Member
    Posted 8 years ago #

    Kafkaesqui,

    I did as you suggested and commented out that one line, then added the other below it, but it made no difference. Still have the same problem. Any other ideas?

    Thanks,
    kopper

  6. Kafkaesqui

    Posted 8 years ago #

    You could try:

    header("Refresh: 0;url=$redirect");

    instead of header("Location: $redirect").

    Redirectify just passes off to the WordPress function wp_redirect(), and *that* merely decides which of the two header lines I've covered are passed to the browser on a redirect. The only difference between 1.5.x and 2.0 wp_redirect() is that in 2.0 it strips carriage returns (new line) from the url if there are any. This is the only thing we're bypassing by providing the header() in the plugin.

    If the above doesn't work all I can suggest is to try the version of Redirectify you're *not* using, in case the differences between the two are at issue:

    http://www.redalt.com/downloads/#redirectify

  7. unknown
    Member
    Posted 8 years ago #

    header("Location: $redirect")

    I'm sorry, but where would I find the above line of code to replace it? I did not see that in redirectify.php.

    And should I leave the other change you suggested earlier in place, or undo it?

    Thanks again,
    kopper

  8. Kafkaesqui

    Posted 8 years ago #

    This is in the Redirectify plugin file:

    wp_redirect($redirect);

    You would change that out with the code you quoted, or the one I noted just above.

  9. unknown
    Member
    Posted 8 years ago #

    Awesome. Replacing wp_redirect($redirect); with header("Location: $redirect") worked perfectly! So for anyone else who's experiencing this problem, that's all you should have to do.

    Thanks!
    kopper

  10. Bhoney
    Member
    Posted 8 years ago #

    I am having th eexact same problem since moving my blog to a top level domain on a new server.I tried the above suggestion and got an error.I then tried several variations that either gave me the same error or the same problem from the start.

    Anyone have any more ideas?

  11. FionaGilbert
    Member
    Posted 8 years ago #

    How do you actually redirect a page or post with this?

    Just wondered as it may be useful :)

  12. Bhoney
    Member
    Posted 8 years ago #

    Once you intstall the plugin and activate it.You do this:

    http://img483.imageshack.us/img483/2687/blackhoneynewpagewordpress1140.png

    Btw, the problem I was having was fixed using this code : header("Refresh: 0;url=$redirect");

  13. UrbanStrata
    Member
    Posted 8 years ago #

    @Bhoney: THANK YOU! Your fix worked perfectly!

    This should be added to the codex, or perhaps Owen Winkler can update Redirectify with the fix coded in somehow.

    (p.s. - Owen, thanks for the plug-in!)

  14. gutielua
    Member
    Posted 8 years ago #

    Tnx by the coment "Kafkaesqui".Works for me!

  15. mrtunes
    Member
    Posted 8 years ago #

    header("Refresh: 0;url=$redirect");

    Good fix! It's actually a smooth redirect as opposed to manually entering in HTML redirect codes. Thanks for this.

  16. davidchait
    Member
    Posted 8 years ago #

    In case people care :), there's also my CG-Redirect plugin which offers similar functionality. And instead of adding a custom meta field, you just add the redirect in the body content, like:
    <redirect http://www.chait.net />

    ... or any other valid url. ;)

    It uses the Location: style redirection, AND also issues http and status header codes for the redirect (defaults to 302, but you can change it to something else, or just set it to 0 to disable setting the headers...). Good for setting up Page links, but having the search engines cache the destination page and not the 'pass-through' page. ;) (which good engines would do anyway, but...)

    -d

  17. GoutWeed
    Member
    Posted 8 years ago #

    David,
    I care :)
    But I cant get your plugin to function. I add
    <redirect http://www.myblog.dk/?cat=11 /> but get a page not found error. (including http://)

  18. GoutWeed
    Member
    Posted 8 years ago #

    As for Owens plug
    Neither replacing wp_redirect($redirect); with header("Location: $redirect") nor ("Refresh: 0;url=$redirect"); worked for me. (I guessing the latter goes same place as the former)
    header("Location: $redirect") actually crashed my site.

  19. davidchait
    Member
    Posted 8 years ago #

    Hmmm, I can't get to anything at:
    http://www.myblog.dk/?cat=11

    Maybe that's because your 'site is crashed'. I don't know why a redirect would 'crash' anything. The worst I've ever seen happen is an infinite loop (well, not infinite, as the browser eventually calls it quits...).

    If you get up and running again, let me/us know. ;)

    (But, I use a header(location) style redirect myself, so if your host box is having some problem with that, which I can't undersand, then cg-redirect and redirectify will show the same result using header(location) in redirectify...)

  20. GoutWeed
    Member
    Posted 8 years ago #

    Sites up and running.

    The redirect should to point to http://www.ekstremisme.dk/?cat=11

    <redirect http://www.ekstremisme.dk/?cat=11 />

  21. davidchait
    Member
    Posted 8 years ago #

    I assume you tried a full url (http://www....)?

    What is the page URL that is supposed to be doing the redirect? I can try to grab it via telnet, see what the actual response code looks like.

    -d

  22. GoutWeed
    Member
    Posted 8 years ago #

    Yes, I used a full URL

    But I managed to fix Owens plugin.

  23. growlydidge
    Member
    Posted 7 years ago #

    Changing to header("Refresh: 0;url=$redirect"); worked for me.

  24. voxie
    Member
    Posted 7 years ago #

    I can't seem to get hold of the Redirectify plug-in.

    I think the developer's been having server trouble...

  25. moshu
    Member
    Posted 7 years ago #

  26. voxie
    Member
    Posted 7 years ago #

    Thanks I found that exact same link lol

    I've now installed and activated it, but the option doesn't appear in the drop down menu for the custom field as illustrated above by Bhoney http://img483.imageshack.us/img483/2687/blackhoneynewpagewordpress1140.png

    I even tried typing 'redirect' and then the value (URL) into the 'Or' field, but I just get a blank page.

    Oh, and I'm using the latest version of WordPress 2.0.4

    Help appreciated ^^

  27. moshu
    Member
    Posted 7 years ago #

    It should work as you described:
    Type "redirect" in the - middle - Key field (no quotes)
    Type the URI in the Value field
    Click "Add custom field".

Topic Closed

This topic has been closed to new replies.

About this Topic