Module

Developer
Supported

Sitemap Module

ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

Parse Error

Support (Resolved)

Gord
Gord

Hey there - just wanted to say this is a great module and if I can get the sitemap.php file working properly then we’ll be in business.

I’ve got the sitemap rendering properly as it should, it updates automatically and tested it with Webmaster tools no problem: http://www.firstfoundation.ca/global/sitemap/

I’m getting an error with the sitemap.php file - depending on what I try it’s either:

Parse error: syntax error, unexpected ‘:’ in /www/eh20908/public_html/sitemap.php on line 8

or

error on line 1 at column 47: Space required after the Public Identifier

Depending on if I define the $sitemap_url or comment it out.

I’ve tried a number of things I’ve seen in this forum and elsewhere - leaving index.php in the URL, or not…checking .htaccess and trying to support the module there:

RewriteCond $1 !^(sitemap\.php) [NC]

But having no luck…hope you can point me in the right direction.

Thanks - Gord

Here’s the code:

<?php
// Prevent content to be cached 
// header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
// Content was generated on past 
// header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
// Content is always modified 

// $sitemap_url = http://www.firstfoundation.ca/index.php/global/sitemap;


// Inform user agent that content is XML and is UTF-8 encoded 
header('Content-type: text/xml; charset=UTF-8'); 


// Read content from template and show it 
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://firstfoundation.ca/index.php/global/sitemap/');
curl_exec($curl_handle);
curl_close($curl_handle);
?> 

 

PutYourLightsOn
# 1
Developer
PutYourLightsOn

since version 2.3 there is no need to use the sitemap.php file. just submit the direct url to your sitemap template to search engines.

Gord
# 2
Gord

Oh ok - awesome - thanks Ben…great work and thanks for the quick response.

PutYourLightsOn
# 3
Developer
PutYourLightsOn

sure thing