![]() |
Brilliant. Perfect. Works like a charm! My SEO thanks you.
|
Hi Joe. Could you add the following codes for search-results?
404 Not Found for no result found 410 Gone for outdated search-ID When a distinction is not possible then the 410 code should be presented. Thx |
Quote:
Updated to version 1.1. I wasn't able to determine whether it was no results found or outdated id however, so I added a new setting that will be the response code for any search.php errors. The default response for this is now 410. I also added code that will prevent the mod from breaking your site if you install it on PHP 5.4+ but later you or your web host downgrade back to PHP 5.3. (Which happened to me.) This was a minor code change so I believe it worked but I was unable to test it- if someone could test and confirm it works I'd appreciate it. |
Thx Joe. The question came from a member of vb-germany.org who wanted a 404 status code for search. And your mod was the closest. And now it fits perfectly. ;)
|
Thanks. I would like to add however the better way would be for search.php to be off limits via a robots.txt file so Google doesn't try to index search links at all.
This is a generic VB robots.txt file for a forum in the /forums/ directory of a website- Code:
User-agent: * |
Those who have < PHP5.4 can add the following at the beginning of the error_generic plug-in and test it. This is a non standardized method, so it may or may not work.
PHP Code:
Thanks to RolandCP for the hint. |
1 Attachment(s)
I have 96 warnings from webmaster tools.
https://vborg.vbsupport.ru/attachmen...1&d=1400664625 Not entirely sure how to deal with them and if this is the correct procedure but installed to see what happens. |
Quote:
You should copy the code to the top of both plugins however. Do you mind if I add the code to the plugin? |
Quote:
|
damn, my host's server (urljet) is using a prior version of php :(
I was all excited to install this lol |
I tested the urls using the site that you provided and do still show status 200.
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Quote:
The new code attempts to change the response code if it can (which isn't guaranteed on old PHP versions) but it won't bug out if it can't it just won't do anything. |
Saweeet.
Installed. |
Quote:
|
I looked in the whole code and I think that this small piece can give false results, when working with the custom pre-5.4 http_response_code() function:
PHP Code:
First I found a way to look for outdated searchids. Second maybe we should send a 503 code for forum closed and server too busy? PHP Code:
PHP Code:
|
Boothby - These are some great ideas- thanks- I will incorporate most, if not all, into the next version. I will list you as a co-author. :)
What is the logic behind this line- PHP Code:
|
This is original from vB_Bootstrap::check_state()
Maybe we should use the whole part, esp. the pemission check? PHP Code:
|
Quote:
Going to have an update available later today. :up: |
Updated to version 2.2. Added options for board closed, and board too busy. Added Boothby as supporter/co-author.
|
Quote:
|
i've got "Possible outages" message from Google :
Quote:
Thanks |
"transient soft" means that the 404 code was never sent- and as the URLs you sent me were to regular threads and not pages that should usually trigger a vBulletin Error message...
I see they message was dated May 8th - Is it possible your site really had a small outage? I would upgrade to the latest version and monitor to see if you get more issues. |
no outage , and i've updated to the latest version today to see the result.
the thing is that traffic has been dropped in last few weeks. it can be from many different things but in this case i'm afraid that this plugin send the same wrong message for exists threads to search engines and indexed links goes down and traffic either. that's a guess only. correct me if i'm wrong. thanks |
Can it be that google can index from public hidden content on your forums?
|
I monitor traffic on a daily basis on my sites and clients sites and have this installed on 3 different forums now and I have not noticed any change at all. I am using php4.3 though right now so that could be the reason. It may take time to show any changes in error pages as well.
I plan on upgrading php next week. Is there any way to test this to see if it works? I have tried but I cannot tell a difference. |
Quote:
If I understand how this works, the test gives you a 200 in the little green box but you see the response code once you hover over it ....hope that helps and hope I am giving you correct information lol ... |
Quote:
Just to verify here I am doing this correctly, One test would be to put a non existent path into the form and it should show a 404 error instead of the Vbulletin no permission page? I think I may be a little confused as to what this does. This does not change error pages but rather response header code so those pages are no longer crawled therefor reducing soft errors and the like? |
Quote:
|
Quote:
This mod kicks in when vBulletin shows a vBulletin generated error message. One way to test it is to test a thread URL such as- Code:
http://www.qapla.com/mods/showthread.php/1203 then change the thread number to something much higher, that you don't have a valid thread for like- Code:
http://www.qapla.com/mods/showthread.php/999999999999 Be aware when testing on your own forum the exact URL may be cached by the status checker... so if you test before the mod is installed be sure to use a different URL (even if it is just a little different) when you test again after installing the mod. If you used a URL that doesn't exist at all like Code:
http://www.qapla.com/mods/shugugaga |
Quote:
|
Quote:
|
Nice work @BirdoPrey, and thanks @Boothby! :)
|
Thanks, working perfectly
|
Updated to version 2.1.1. Fixed error on for VB 3.x users on legacy PHP versions (below 5.4.0)
|
|
Quote:
What exact version of this plugin was installed? |
All times are GMT. The time now is 06:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|