Closed skrosoft closed 7 years ago
Made an answer in the PR, I completely agree I am surprised as I as absolute URL on projects. But definitively a good fix, I just want to understand why it was working for us. (symfony version?)
Thank you @skrosoft merged and tagged
Hello,
Sitemap is giving us a relative path when it should give absolute path (ref: https://support.google.com/webmasters/answer/183668?hl=en)
It return:
When it should return:
In this file https://github.com/Novactive/NovaeZSEOBundle/blob/develop-ezplatform/Controller/SitemapController.php#L166
We should use:
$url = $this->generateUrl( $location, [ ], UrlGeneratorInterface::ABSOLUTE_URL );
Instead of
$url = $this->generateUrl( $location, [ ], true );
The same for the line https://github.com/Novactive/NovaeZSEOBundle/blob/develop-ezplatform/Controller/SitemapController.php#L190
I made a pull request.
Vincent