No it can't. That curl command goes as your cron command.Ahmed-E-Shop wrote: ↑Thu Feb 06, 2025 9:15 pm
So let me clarify : Can this line :be replaced with this line :Code: Select all
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
in the .htaccess file ?Code: Select all
curl https://domain.com.au/index.php?route=extension/feed/google_sitemap > /home/user/public_html/sitemap.xml
cue4cheap not cheap quality
No, you cannot use curl in htaccess.Ahmed-E-Shop wrote: ↑Thu Feb 06, 2025 9:15 pmYes, it is clear to me that the problem is not in creating the file itself. According to my understanding from the colleagues' words, it is finding a way to create the file smoothly to speed up the archiving process.nonnedelectari wrote: ↑Thu Feb 06, 2025 9:22 amYou do not need to create a sitemap.xml file, that is what this, in htaccess, is for:Ahmed-E-Shop wrote: ↑Thu Feb 06, 2025 4:02 am
I would Like to generate sitemap.xml ( OC 3.0.4.0 )
Can you help me ?
Where can I add or execute this code to create the file ?
Thanksjust submit the sitemap as /sitemap.xml and that htaccess line will translate it to the extension and send out the generated sitemap.Code: Select all
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
If the generation is too slow, you could always cache the output.
So let me clarify : Can this line :be replaced with this line :Code: Select all
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
in the .htaccess file ?Code: Select all
curl https://domain.com.au/index.php?route=extension/feed/google_sitemap > /home/user/public_html/sitemap.xml
In considration this is ( /home/user ) a { Rootname }
Is this a practical result of the serious discussions that took place here ? ( Expert may tell us )
You can just cache the sitemaps using the standard cache functionality:
in catalog/controller/extension/feed/google_sitemap.php
add this:
Code: Select all
// enable cache, set the cache file and try to read it
$cache = true;
$cache_file = 'sitemap-google';
$output = false;
if ($cache) $output = $this->cache->get($cache_file);
if ($output === false) {
Code: Select all
if ($this->config->get('feed_google_sitemap_status')) {
Code: Select all
// write the cache file if cache enabled
if ($cache) $this->cache->set($cache_file,$output);
}
Code: Select all
$output .= '</urlset>';
Yes, but this has already been described above.Ahmed-E-Shop wrote: ↑Thu Feb 06, 2025 9:15 pmIs this a practical result of the serious discussions that took place here ? ( Expert may tell us )
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Legendary Member
Thanks. Cue4cheap
Thanks, nonnedelectari, for this nice extra code.
Thanks, paulfeakins (How can I do this automatically is what was not clear to me?) I read about cron jobs, and now it is completely obvious to me.
Thanks, nonnedelectari, for this nice extra code.
Thanks, paulfeakins (How can I do this automatically is what was not clear to me?) I read about cron jobs, and now it is completely obvious to me.
Who is online
Users browsing this forum: No registered users and 10 guests