PDA

View Full Version : Board Optimization - Google WMT friendly 404 Search mod


Adult SEO
05-16-2007, 10:00 PM
Hi there!

The folowing mod will enable you to setup a true 404 page while displaying the search page with a customizable message to your users.

Installation instructions for vBSEO (http://www.vbseo.com/378/) users:

Import the attached XML product
Include the folowing tag in your search template called search_forums where you want to display the 404 message:
<!-- 404message -->
Upload 404.php to your forum root
Sign in to your vBSEO (http://www.vbseo.com/378/) adminpanel and edit your 404 page settings with the folowing configuration:
64442Installation instructions for non-vBSEO (http://www.vbseo.com/378/) users:

Import the attached XML product
Include the folowing tag in your search template called search_forums where you want to display the 404 message:
<!-- 404message -->
Upload 404.php to your forum root
Edit your htaccess page and add the folowing code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ 404.phpRequirements: PHP Curl (http://www.php.net/curl)

The template to edit for the custom message on the searchpage is search_forums_404

A demo can be found on http://www.vbcash.com/blablabla.html

Have Fun!
Jan Jaap

maxicep
05-17-2007, 01:10 PM
thanks

machethier
05-17-2007, 02:21 PM
seems to be usefull

Hornstar
05-18-2007, 05:22 AM
Step 2 confuses me a bit. on what search page do you include that?

Adult SEO
05-18-2007, 05:30 AM
Hi there!

It should be in your search template called search_forums editable from your Admin CP controlpanel.

Best Regards,
Jan Jaap

FreshFroot
05-19-2007, 10:34 PM
nice stuff :D

PoetJA-1975
05-21-2007, 05:03 AM
This is very nice - Thanx for the sharing.
One Concern: When already logged in and browsing to http://jpicforum.info/blablabla.php - It brings up the page as if I'm logged out. Any suggestions?

Thanx,

Jacquii.

PoetJA-1975
05-29-2007, 06:36 AM
Hello? Support?
Thanx,

Jacquii.

Adult SEO
05-29-2007, 08:12 AM
Hi there!

This is due to the fact that the html of the search page is fetched via http using lib Curl.

Best Regards,
Jan Jaap

PoetJA-1975
05-29-2007, 06:25 PM
OK - Thanx JAN for the response ;)

Jacquii.

Icyeb
06-07-2007, 04:46 AM
nice work, got it installed on 3.6.7pl1 without any major problem except the logged out problem. is there a way to redirect users to the homepage instead of showing the search page

tokenyank
06-20-2007, 02:39 PM
cookie isn't persistant...

If logged in member puts in bad url, delivers search page with 404 but also delivers page as though they aren't logged in.

As an aside, I edited .htaccess in domain root to:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /home/YOURINFO/public_html/YOURFORUMDIRECTORY/404.php


This also provides custom 404's domain wide. This is still parsing as a guest though too.

If the cookie issue can't be fixed, I'll have to uninstall... Hopefully there's a fix!

tokenyank
06-20-2007, 03:03 PM
ooops!

Umm... A friendly pointer!

If you've just gutted your site and took 3 years of content down and made your forums the 'ONLY' content on your site... Putting a custom 404 into your search.php may not be a good idea when you have around 300 spiders all hitting it at the same time.

Server load spiked to 9 and brought down httpd.

A server reboot and hack uninstall later, all fine again! Looks like I'm stuck using normal ol' shtml 404's! :)