Dax

Objection Redirection!

January 11th, 2006 · 23 Comments

redir.gifI upgraded my old site to Worldpress and damned if I don’t have a million 404’s now.  Including a bunch of pictures of Spongebob and Doodlebob that I drew that apparently a dozen people hotlinked.  Fuckers.

I wrote this to redirect incoming traffic without having to fuck with the .htaccess file.  I hate that file.

Download Objection Redirection v23.0

To install, unzip the files into your plugins directory.  You must have the objection_redirection_gogogo file in your wp-content/plugins directory for the plugin to work.  If you mess everything up and you need to turn off the plugin, but can’t get back into your admin page, DELETE THE OBJECTION-REDIRECTION-GOGOGO FILE.

UPDATE v23.0

I put a failsafe file in the plugin so you can’t completely fuck your blog over and put it in an endless loop forever.

UPDATE v22.0

Fixed the infinite redirect condition where your blog.com -> www.blog.com would loop infinitely.  That’s no damn good.  You can now use http:// in your URL requested field to mark the start of a URL.

http://biggnuts.com -> www.biggnuts.com

That’s the best way to redirect your non-www traffic. 

I think it’s pretty self-explanatory.  When you install it, it creates a new table in your dB and gives you a new option page.  The plugin matches from one to three rules of incoming traffic.  The User Agent, the incoming URL, and the Referer URL.  If they match your settings, then the plugin either redirects the whole thing, or replaces the part that matches with a new part and redirects.  It’s up to you.

The plugin also does either 301, 302, or 307 redirection.  Those don’t really matter unless you’re some kind of SEO slimeball who ruined the internet.

I wrote this for work, so here’s the thread on Heir Boseir’s blog.  Let me know if there are any problems.

UPDATE: This plugin seems to have som pretty confusing instructions. I’m going to change it and throw in some defaults this week (I hope). For now, I’m including this screen shot of my settings. It should help you out.or-example.jpg

Tags: Wordpress Plugins

23 responses so far ↓

  • 1 Bjorn Solstad aka basicus // Mar 14, 2006 at 5:14 pm

    Hm.. Eigher I am stupid, or this thing does not work on my site. I have been stearing till my eyes almost popped out of my head on your examples, and I don’t get it.

    Whatever I try to do with the plugin, it seems like nothing happens, and it does not save anything (it seems to me at least).

    Could you please show a working exaple how to fill in the fields in the Options -> Redirection page - without any comments. Just what to fill in where?

  • 2 hammer // Mar 14, 2006 at 5:24 pm

    What are you trying to redirect? Give me the URLs and I’ll make the rules.

  • 3 Bjorn Solstad // Mar 14, 2006 at 6:01 pm

    I’m trying to redirect from http://www.devenia.com/about.html to http://www.devenia.com/about/

    I have a few others I need to to as well, but I guess I will be able to figure those out when I just have ONE working example.

    Thanks for taking the time for this..

  • 4 hammer // Mar 14, 2006 at 6:10 pm

    No problem.

    You want something like this right?

    http://www.biggnuts.com/contact-me.html

    For that effect, I use the following:

    URL REQUESTED: http://www.biggnuts.com/contact-me.html
    REDIRECT ASS: http://www.biggnuts.com/contact-me/

    That should do it, just replace contact-me with about in both lines.

    You can also very simply put:

    URL REQUESTED: contact-me.html
    REDIRECT ASS: contact-me/

    But that obviously has more consequences than the first.

  • 5 Bjorn Solstad // Mar 15, 2006 at 4:10 am

    Ah.. Thanks a lot! It works like a dream now! That example showed clearly where to put what :)

  • 6 graywolf // May 26, 2006 at 6:06 pm

    Dude this totally rocks, if you’re going to San Jose I so owe you a beer!

    One thing you may want to look at if you are going through and fixing your lame original wordpress install and you have a lot of posts you need to be careful of this

    example.com/?p=4
    example.com/?p=41
    example.com/?p=400

    All three of those would be sent to the same new URL, I just put a space on the end as a work around.

  • 7 hammer // May 26, 2006 at 7:02 pm

    Hey, thanks graywolf. I think if you enter those URLs in the opposite order, you’ll be fine.

  • 8 osbeorht // Jun 29, 2006 at 9:07 am

    Great job guys… Thank for you work…

  • 9 Lars Christian // Nov 21, 2006 at 5:44 am

    Hehe, this finally works like a charm! :)

    I fiddeled a lot with it to figure out why the wouldn’t redirect properly at first, until i disvocered the location it lokked for the gogogo file.

    I use wordpress as CMS/frontpage on my webside, but have kept it in a separate directory below the root; hence I moved the index file down into the root and changed the include.

    I had to prepend ‘wordpress’ to the gogogo check as well:

    if(!file_exists(”wp-content/plugins/objection_redirection_gogogo”))

    changed to

    if(!file_exists(”wordpress/wp-content/plugins/objection_redirection_gogogo”))

    Now it works! :)
    Thanx a bunch!

    Lars

  • 10 adult dvd reviews janine s got male deep throat fuck twinks movies free clips // Dec 18, 2006 at 6:09 pm

    adult dvd reviews janine s got male deep throat fuck twinks movies free clips

    adult dvd reviews janine s got male deep throat fuck twinks movies free clips

  • 11 allergy // Mar 10, 2007 at 1:02 am

    where do the 404 pages go?

  • 12 link // Mar 10, 2007 at 3:11 am

    neat plug in. thanks, now all my links work permanately.

  • 13 Chris Abraham - Because the Medium is the Message // Apr 24, 2007 at 2:04 pm

    All The Wordpress Plugins I am Exploring for Use…

    I am developing a bunch of WordPress blogs in the next couple months and I wanted to get up-to-date. I have not checked any of them for WordPress 2.1 compliance — which I will do — but i just wanted……

  • 14 sam // Oct 10, 2007 at 11:27 am

    Any chance of fixing this up for the latest version of wordpress? It doesn’t seem to work anymore.

  • 15 Brian Turner // Nov 14, 2007 at 4:52 am

    Something that allows generic redirection when changing URL structure would also be handy in this plugin. :)

  • 16 tosh // Dec 1, 2007 at 10:50 pm

    great plugin, finally i found it, a handy script.. thanks bro

  • 17 Alex // Jan 13, 2008 at 1:41 pm

    Nice plugin, I’ll give it a try. Thanks :-)

  • 18 manele // Mar 13, 2008 at 10:34 am

    Nice plugin. Thnx

  • 19 Sam // Apr 9, 2008 at 6:51 am

    Awesome plug in, saved me a shed load of time.
    Nice, nice, nice.

  • 20 mailce // Apr 14, 2008 at 8:51 am

    thanks..

  • 21 Star // Apr 26, 2008 at 11:02 am

    I actually have been searching for this. Thanks a million dude.

  • 22 chris // May 11, 2008 at 6:48 pm

    Real nice plugin, thanks, but wouldn’t it be easier to just edit the .htaccess and put some rewrite rules?

    Yeah, I’m lazy too so I’m gonna use it :P

  • 23 ozan sumer // Jul 8, 2008 at 11:57 am

    thank worderful plugin..

Leave a Comment