Search Results

Post Reply
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Search Results

Post by tubeman »

Hi,
If someone searches on site and there are 0 thumbs the pages should return 404 as per this setting:

Test Settings - URLs with 0 result thumbs return 404 - Yes

But when I did a search, results with 0 thumbs give the page with Result 200 in header with 0 thumbs. How to fix this?
admin
Site Admin
Posts: 37249
Joined: Wed Sep 10, 2008 11:43 am

Re: Search Results

Post by admin »

Other sites do not return 404 on search , that's not in RFC
but you can do it like

<?php
if ( '<!--TOTAL_ITEMS-->' == 0 ) {
header("HTTP/1.0 404 Not Found");
header('Location: /?force_template=content_not_found');
}
Don't forget to run script update
Post Reply