Skip to main content
Topic: Why is Board Index marked no index? (Read 1465 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Why is Board Index marked no index?

So I noticed my forum boardindex is marked robot noindex.  That is xxx.xxx/forum  or xxx.xxx/forum/index.php.

I think it's a bug, but I'm not sure so I'm posting it here.  Move to bug if it is.

The no index is coming from BoardIndexController.php

Code: [Select]
		// Do not let search engines index anything if there is a random thing in $_GET.
if (!empty($this->_req->query))
$context['robot_no_index'] = true;

req->query always has start=0 in it.  This is set in Request.php
Code: [Select]
		// There should be a $_REQUEST['start'], some at least.  If you need to default to other than 0, use $_GET['start'].
if (empty($_REQUEST['start']) || $_REQUEST['start'] < 0 || (int) $_REQUEST['start'] > 2147473647)
$_REQUEST['start'] = 0;

However even commenting out the above in Request.php still causes the robot_no_index to be triggered in BoardIndexController.php even though printing $this->_req->query shows an empty array.  However, replacing the check to match the comment and checking if $_GET is empty then the noindex is not triggered if there are no parameters.

Re: Why is Board Index marked no index?

Reply #1

How about this?  Why is it not marked noindex here?

Re: Why is Board Index marked no index?

Reply #2

I have had only a phone in the last week, it's kind of difficult to do development there... ;)
Bugs creator.
Features destroyer.
Template killer.