Page 1 of 1

Noindexing admin pages

Posted: Thu Jun 26, 2014 9:33 am
by Annie
Script URL:
Version of script: 1.7
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: search engines, noindex, meta

Write your message below:

I notice that the search engines are indexing my View IP, Reply and Delete admin pages as well as my entries. Is there a way to add a noindex command for these particular admin items without losing the indexing of my actual guestbook comments.

Re: Noindexing admin pages

Posted: Sat Jun 28, 2014 9:44 am
by Klemen
I wouldn't worry about that, but if you insist you could try modifying few files:

In templates/default/overall_header.php just below

Code: Select all

<head>
add

Code: Select all

<?php
if ( defined('NOINDEX') )
{
	echo '<meta name="robots" content="noindex, nofollow" />';
}
?>
Then in gbook.php find

Code: Select all

switch ($a)
and below that you will see several lines starting with case

Find pages you wish to hide from search engines (recognize them by "a=PAGENAME" in url after gbook.php, for example "a=delete") then add

Code: Select all

define('NOINDEX', true);
below the case line with the page name.

For example to hide the delete page, change

Code: Select all

        case 'delete':
        confirmDelete();
        break;
to

Code: Select all

        case 'delete':
		define('NOINDEX', true);
        confirmDelete();
        break;

Re: Noindexing admin pages

Posted: Tue Jul 01, 2014 7:35 pm
by Annie
Many thanks. I will give it a go.