You are here:  » 410 gone page when merchant is deleted


410 gone page when merchant is deleted

Submitted by wesse249 on Mon, 2016-02-22 08:55 in

Hello David,

How can i generate 410 gone page when a merchant is removed?

example.com/merchant/AKG/2.html

Thanks Jan Roel

Submitted by support on Mon, 2016-02-22 09:39

Hello Jan,

Sure - first create a new page 410.php (so that you can issue the 410 Gone header and still include custom HTML content if you wish) as follows:

<?php
  header("HTTP/1.0 410 Gone");
?>
<html>
  <body>
    <h1>410 Gone</h1>
  </body>
</html>
?>

And then in search.php, look for the following code at line 500:

  $showing = " (".translate("no results found").")";

...and REPLACE with:

  if ($parts[0]=="merchant")
  {
    require("410.php");
    exit();
  }
  $showing = " (".translate("no results found").")";

Or alternatively, for the same functionality for category and brand index pages also, use:

  if (isset($parts[1]) && $parts[1])
  {
    require("410.php");
    exit();
  }
  $showing = " (".translate("no results found").")";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com