lgraubner/sitemap-generator-cli

Https and cli

damdec opened this issue · 1 comments

Hello,

Seems like https is not supported ?

➜  ~ sitemap-generator -V                        
4.1.0

➜  ~ sitemap-generator -d https://www.poulpeo.com
Site "https://www.poulpeo.com" could not be found

I found in cli.js that you set the port to 80 :

var generator = new SitemapGenerator(program.args[0], {
  stripQuerystring: !program.query,
  restrictToBasepath: program.baseurl,
  port: (process.env.NODE_ENV === 'development' ? 5173 : 80),
});

I've tried to set 443, but then the URL is modified with the port included... so we get a 301 redirection... and the sitemap generated also include the port (:443).

➜ ~ sitemap-generator -d https://www.poulpeo.com/aide.htm
[ OK ] https://www.poulpeo.com:443/aide.htm

Do you have any workaround ?
Thanks

I've finally found a way to generate a sitemap by adding an exception in my htaccess file, to skip the rewrite rule that check the domain (to ensure www.mydomain.com instead of mydomain.com).

RewriteCond %{USER_AGENT} !(Node/SitemapGenerator)