0
Welcome Guest! Login
0 items Join Now

SOLVED Sucuri site check and gantry

  • Re: SOLVED Sucuri site check and gantry

    Posted 8 years 2 months ago
    • It should work after


      $doc = JFactory::getDocument();
      $doc->setTitle($this->error->getCode() . ' - '.$this->title);

      The guy above you just did it
    • Last Edit: 8 years 2 months ago by Hola789432.
  • Re: SOLVED Sucuri site check and gantry

    Posted 8 years 1 week ago
    • Thanks for the solution offered in this thread, I got a partial success from it with the Oculus template.

      My code looks like this:

      // load and inititialize gantry class
      global $gantry;
      require_once(dirname(__FILE__) . '/lib/gantry/gantry.php');
      $gantry->init();
      
      $doc = JFactory::getDocument();
      $doc->setTitle($this->error->getCode() . ' - '.$this->title);
      
      // Gantry 404 error fix
      $_format = JFactory::getApplication()->input->get('format', 'html');
       if ($_format != "html") {
       header("HTTP/1.0 404 Not Found"); 
       die();
          }
      // End Gantry 404 Error Fix

      But instead of the standard 404 page it renders a blank page as suggested earlier. Although if I check a non-existent link via an online code validator the page is generating a 404 response, so I guess it's working as far as crawlers go but not for humans.
  • Re: SOLVED Sucuri site check and gantry

    Posted 8 years 1 week ago
    • Humans shouldn't be fiding non html pages. But you could do this:


       header("HTTP/1.0 404 Not Found");
       print "404 - Not Found";
       die();
    • The following users have thanked you: MrT, Daniel Benson

  • Re: SOLVED Sucuri site check and gantry

    Posted 7 years 3 months ago
    • Stupid Question perhps but where do I find error.php to addend the code???
  • Re: SOLVED Sucuri site check and gantry

    Posted 7 years 3 months ago
    • athenasennes wrote:
      Stupid Question perhps but where do I find error.php to addend the code???

      /public_html/joomla/templates/rt_xxx/error.php

Time to create page: 0.044 seconds