Example #1
0
 public function xmlSitemapGz()
 {
     if (file_exists($this->metaService->getSiteMapPath(true))) {
         header("Content-Type: text/xml");
         header("Content-Encoding: gzip");
         exit(file_get_contents($this->metaService->getSiteMapPath(true)));
     } else {
         header("HTTP/1.0 404 Not Found");
         exit('Sitemap generation in progress...');
     }
 }