Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento still has issues with /pub in sitemap #153

Open
dverkade opened this issue Nov 12, 2020 · 1 comment
Open

Magento still has issues with /pub in sitemap #153

dverkade opened this issue Nov 12, 2020 · 1 comment

Comments

@dverkade
Copy link

As Magento still has issues with the /pub folder in the sitemap XML (see for instance the following issue) magento/magento2#30901 I think it makes sense to solve this in the deployment.

Currently there's a shared folder located in /pub/sitemaps/ which is a symlink to the shared folder. If you use that path for creating a sitemap it will add the /pub folder in the URL of the sitemap.

This can be resolved by creating another symlink from the root of the magento folder, symlinking it to the same sitemap folder in the shared folders. In Magneto a sitemap can be submitted to the following base path "/sitemaps". It will be generated without the /pub folder in the URL and is still accessible, because there's another symlink pointing to the same folder in the /pub directory.

@PascalBrouwers
Copy link

Or keep the sitemap in /pub/sitemaps/ and create a symlink in /pub to itself:

cd pub
ln -sfn pub .

this way you can serve from /pub and have the sitemap configured as /pub/sitemaps/

Either way https://github.com/davidalger/capistrano-magento2 already allows you to add shared folders the way you like. No modifications are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants