Skip to content

Commit

Permalink
Merge pull request #1003 from oricgn/master
Browse files Browse the repository at this point in the history
Redirect to index.php when there's no query string
  • Loading branch information
oricgn authored Sep 27, 2016
2 parents 936763a + f000a9b commit 8ce5dca
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions addon.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@

require_once './common.php';

// Search bots are trying to call this script without query string,
// redirect to homepage.
if (!$_GET && !$_POST && !$PHORUM['args']) {
header('HTTP/1.1 303 See Other');
header('Location: index.php');
exit;
}

// Bail out early if there are no modules enabled that implement
// the addon hook.
if (! isset($PHORUM["hooks"]["addon"])) trigger_error(
Expand Down

0 comments on commit 8ce5dca

Please # to comment.