PDA

View Full Version : 404 Not Found turns into vBulletin search!


Beorn
22 Dec 2002, 03:27
Well, I can't say that this is the most advanced, or most original thing I've written, but I figure it'll be a good hack to post first.

Say a user goes to your forum, and is looking for something specific and quick. Perhaps your forum is a Tolkien based forum...and the user was looking for information on Gandalf, the user could go to http://www.yourforum.com/gandalf, and a search would be generated. Basically what this hack does is it uses GET data as POST data in what would be submitted by search.php.

Features:

Incorporates permissions to match your forums permissions.
Gives the most common bots and spiders a 404 error.
Small, and disgustingly easy installation
Explicitly clear instructions for configuration (comes preconfigured with vBulletin defaults)


The attached zip by default only works on Apache's httpd or other servers that support .htaccess and ErrorDocument directive. Can be configured for IIS, but extra work on your part (and probably your host's) part.

So far, it has been tested and works on 2.2.8 and 2.2.9, but it should work on 2.2.*.

Ahh, yes, I said it wasn't original. I got the idea from php.net (http://www.php.net)'s neat little idea where you can go to http://www.php.net/something and it will search for something.

To Install:

Upload 404.php to your forum root directory.
If you have a .htaccess file in place already, copy the line from the supplied file into your file. If you *do not* have a .htaccess file in place already, add the file.



Lets see, I believe that's all...nope

Oh, yes, one last...yes, finally last...thing, please, please click Install if/when you install this hack.

That's all folks!

EDIT: VERSION 1.0

Velocd
22 Dec 2002, 04:01
Interesting idea Beorn, although I can't say it's really needed by me, but I'll defiantly consider it for future installation. ;)

DrkFusion
22 Dec 2002, 04:06
Screenshots?

Does this perform a search through the vB forum search, or a websearch through some other site.

*Didn't read full post*

Link14716
22 Dec 2002, 04:11
Originally posted by DrkFusion
Screenshots?

Does this perform a search through the vB forum search, or a websearch through some other site.

*Didn't read full post*

Basically what this hack does is it uses GET data as POST data in what would be submitted by search.php.

vB forum search

Nice hack, I might consider it :)

DrkFusion
22 Dec 2002, 04:16
Great, I will check it out :)

Beorn
22 Dec 2002, 05:00
Originally posted by DrkFusion
Screenshots?

Does this perform a search through the vB forum search, or a websearch through some other site.

*Didn't read full post*

There really are no screenshots. Basically if you went to yourforum.com/searchforthis, it would be the same as yourforum.com/search.php, and typed in 'searchforthis' and hitting enter.

Great, I will check it outThanks :)
Interesting idea Beorn, although I can't say it's really needed by me, but I'll defiantly consider it for future installation. ;)*tries to convince you that you really do need it ;)


Oh, yes, one last thing, please, please click Install if/when you install this hack

Thanks all,
Mike

MrLister
22 Dec 2002, 07:22
It's just like on php.net. It's great just too bad I already use php 404 handler for pages.

Herman
22 Dec 2002, 14:43
This is very nice, I will definately install this, thanks!

/me clickies install

snyx
22 Dec 2002, 20:43
could I see a working demo by any chance?

DrkFusion
22 Dec 2002, 22:02
I installed this, and it works great, because search engine cached pages that do not work because maybe I moved it or something, but now the potential users will not leave :)

Sebastian
30 Dec 2002, 20:00
this seem pretty cool... what seems handy is someone can just type anything in the url field like if they are performing a regular search, saves you a step from having to find the search link/button.

Minots
28 Jan 2003, 12:20
@ Beorn
Cool Job! thx
*installed & working* :)

Overgrow
04 Feb 2003, 10:31
Personally I love the idea. I already do something similar with my FAQ...

http://www.overgrow.com/faq/clone
http://www.overgrow.com/faq/hydroponics

I just don't think too many people use it :)

filburt1
04 Feb 2003, 20:03
Very nice hack, just like php.net works. Thanks :)

amykhar
22 Mar 2003, 14:50
On my board, it cuts off the first letter of the search term. If I put in http://www.eaforums.com/forums/frog, it searches for rog.

I have not modified your code any.

Amy

Boofo
22 Mar 2003, 22:57
Nice hack. ;)

I have 2 questions...

1- Does anybody have a good list of robots to include in the 404.php file

2- I have a search engine indexer installed. what will this do to spiders that are excluded from that?

Boofo
23 Mar 2003, 18:37
I can't seem to get this to work. I get a page cannot be displayed error. Any ideas what I am doing wrong?

Beorn
21 Apr 2003, 01:44
Hello all. I'm really sorry that I haven't said a single thing on this thread in so long, but in the past two months, my life has been hell. Sitting down at a computer for more than 10 minutes has been unheard of. I will shortly (2 or 3 days) be releasing version 1.0, with a few things fixed. Amykhar's problem I've encountered, and I realized what's wrong, but I haven't looked into Boofo's problem.

Now, for some reason IE will not follow 404 redirects for my domain. It will for a different domain on the same host. Opera will. Who knows....

Mike B


EDIT: Should the config be in the file, or via ACP? Putting it in the ACP involves actually integrating the hack, while in the file doesn't. I personally prefer hacks to lay on top of, not be part of a base system, so I would go with in the file. What's everyone elses' opinion?

Yet again,
Mike B

Beorn
29 Apr 2003, 20:39
V 1.0 is out :)

Fixed AmyKhar's problem, can't figure out what Boofo's is...

GaleForce
29 Apr 2003, 21:05
Is there a demo of this anywhere? I would love to see it in action :)

Beorn
29 Apr 2003, 21:13
http://www.tolkiendebates.com/philial piety

TheLab
28 Sep 2003, 09:53
I can't seem to get this to work. I get a page cannot be displayed error. Any ideas what I am doing wrong?

I know its an old hack/post and i dont even know if it works with 2.3.0. I get the same error boofo..
Any luck about it?

Limpkinw
09 Oct 2003, 20:03
i have IE and im not quite sure what to do with this hack...its not working when installed as stated... any suggestions? thanks.