Magento 2.2.8 - sitemap.xml contains “pub” DIR in the URL, it should be without “pub” directory in the URLWant to remove a specific url from Magento sitemap.xml?Magento 2 multi Store issueMagento Multi Store with multiple domainsHow to remove image url from sitemap.xml Magento 2?Issue with Authorized.net with Magento2.2.5ERR_CONNECTION_REFUSED after Magento2 Migration to Google CloudMagento 2 static files are not being loaded after enabling HTTPSMagento 2.1.3 Build multiple store views with unique subdomains pull CSS and JS from parent website URL?Site maps are being generated automatically with /pub/media in the URL giving 404 errorsMagento 2.2.8 - Has Magento removed the Company field from the checkout?
Quick destruction of a helium filled airship?
What should I do if actually I found a serious flaw in someone's PhD thesis and an article derived from that PhD thesis?
What was the intention with the Commodore 128?
Vector field Stream?
How do ultra-stable oscillators for spacecraft work?
What's the relationship betweeen MS-DOS and XENIX?
Is there a fallacy about "appeal to 'big words'"?
The space of cusp forms for GL_2 over F_q(T)
Output the list of musical notes
Is there any official ruling on how characters go from 0th to 1st level in a class?
Can anybody tell me who this Pokemon is?
What is the opposite of "hunger level"?
Minimum population for language survival
Select elements of a list by comparing it to another list
Have there ever been other TV shows or Films that told a similiar story to the new 90210 show?
If a person claims to know anything could it be disproven by saying 'prove that we are not in a simulation'?
Does writing regular diary entries count as writing practice?
6502: is BCD *fundamentally* the same performance as non-BCD?
Is Fourier series a sampled version of Fourier transform?
What would cause a nuclear power plant to break down after 2000 years, but not sooner?
Will some rockets really collapse under their own weight?
Is a USB 3.0 device possible with a four contact USB 2.0 connector?
Would molten tin solidify and coat an organic horn?
Set theory with antielements?
Magento 2.2.8 - sitemap.xml contains “pub” DIR in the URL, it should be without “pub” directory in the URL
Want to remove a specific url from Magento sitemap.xml?Magento 2 multi Store issueMagento Multi Store with multiple domainsHow to remove image url from sitemap.xml Magento 2?Issue with Authorized.net with Magento2.2.5ERR_CONNECTION_REFUSED after Magento2 Migration to Google CloudMagento 2 static files are not being loaded after enabling HTTPSMagento 2.1.3 Build multiple store views with unique subdomains pull CSS and JS from parent website URL?Site maps are being generated automatically with /pub/media in the URL giving 404 errorsMagento 2.2.8 - Has Magento removed the Company field from the checkout?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Preconditions
app/etc/env.php
'directories' => [ 'document_root_is_pub' => true ],
'MAGE_MODE' => 'production',
document_root_is_pub
istrue
MAGE_MODE
is haveproduction
value
sitemap.xml
- Filename : sitemap.xml
- Path : /media/
Admin => Stores => Configuration => General => Web:
Base Urls => Base URL for User Media Files =>unsecure_base_urlmedia/
Base URLs (Secure) => Secure Base URL for User Media Files => secure_base_urlmedia/
But while generating the sitemap.xml
Expected result
- sitemap.xml index urls to sitemap should be
https://magento-site/media/sitemap-1-1.xml
Actual result
- Sitemap.xml urls look like
https://magento-site/pub/media/sitemap-1-1.xml
NOTE : I have generated the sitemap from admin panel.
Any solution or advise will be really helpful.
magento2 sitemaps magento2.2.8 webroot
add a comment |
Preconditions
app/etc/env.php
'directories' => [ 'document_root_is_pub' => true ],
'MAGE_MODE' => 'production',
document_root_is_pub
istrue
MAGE_MODE
is haveproduction
value
sitemap.xml
- Filename : sitemap.xml
- Path : /media/
Admin => Stores => Configuration => General => Web:
Base Urls => Base URL for User Media Files =>unsecure_base_urlmedia/
Base URLs (Secure) => Secure Base URL for User Media Files => secure_base_urlmedia/
But while generating the sitemap.xml
Expected result
- sitemap.xml index urls to sitemap should be
https://magento-site/media/sitemap-1-1.xml
Actual result
- Sitemap.xml urls look like
https://magento-site/pub/media/sitemap-1-1.xml
NOTE : I have generated the sitemap from admin panel.
Any solution or advise will be really helpful.
magento2 sitemaps magento2.2.8 webroot
1
Please set 'MAGE_MODE' to production in env.php file. 'MAGE_MODE' => 'production'.
– Sunny Rahevar
Aug 5 at 9:58
Hello @SunnyRahevar Thanks for your reply I have checked MAGE_MODE and it is already 'MAGE_MODE' => 'production',
– Aditya Shah
Aug 5 at 10:01
add a comment |
Preconditions
app/etc/env.php
'directories' => [ 'document_root_is_pub' => true ],
'MAGE_MODE' => 'production',
document_root_is_pub
istrue
MAGE_MODE
is haveproduction
value
sitemap.xml
- Filename : sitemap.xml
- Path : /media/
Admin => Stores => Configuration => General => Web:
Base Urls => Base URL for User Media Files =>unsecure_base_urlmedia/
Base URLs (Secure) => Secure Base URL for User Media Files => secure_base_urlmedia/
But while generating the sitemap.xml
Expected result
- sitemap.xml index urls to sitemap should be
https://magento-site/media/sitemap-1-1.xml
Actual result
- Sitemap.xml urls look like
https://magento-site/pub/media/sitemap-1-1.xml
NOTE : I have generated the sitemap from admin panel.
Any solution or advise will be really helpful.
magento2 sitemaps magento2.2.8 webroot
Preconditions
app/etc/env.php
'directories' => [ 'document_root_is_pub' => true ],
'MAGE_MODE' => 'production',
document_root_is_pub
istrue
MAGE_MODE
is haveproduction
value
sitemap.xml
- Filename : sitemap.xml
- Path : /media/
Admin => Stores => Configuration => General => Web:
Base Urls => Base URL for User Media Files =>unsecure_base_urlmedia/
Base URLs (Secure) => Secure Base URL for User Media Files => secure_base_urlmedia/
But while generating the sitemap.xml
Expected result
- sitemap.xml index urls to sitemap should be
https://magento-site/media/sitemap-1-1.xml
Actual result
- Sitemap.xml urls look like
https://magento-site/pub/media/sitemap-1-1.xml
NOTE : I have generated the sitemap from admin panel.
Any solution or advise will be really helpful.
magento2 sitemaps magento2.2.8 webroot
magento2 sitemaps magento2.2.8 webroot
edited Aug 5 at 10:34
Aditya Shah
asked Aug 5 at 9:48
Aditya ShahAditya Shah
5,1172 gold badges12 silver badges45 bronze badges
5,1172 gold badges12 silver badges45 bronze badges
1
Please set 'MAGE_MODE' to production in env.php file. 'MAGE_MODE' => 'production'.
– Sunny Rahevar
Aug 5 at 9:58
Hello @SunnyRahevar Thanks for your reply I have checked MAGE_MODE and it is already 'MAGE_MODE' => 'production',
– Aditya Shah
Aug 5 at 10:01
add a comment |
1
Please set 'MAGE_MODE' to production in env.php file. 'MAGE_MODE' => 'production'.
– Sunny Rahevar
Aug 5 at 9:58
Hello @SunnyRahevar Thanks for your reply I have checked MAGE_MODE and it is already 'MAGE_MODE' => 'production',
– Aditya Shah
Aug 5 at 10:01
1
1
Please set 'MAGE_MODE' to production in env.php file. 'MAGE_MODE' => 'production'.
– Sunny Rahevar
Aug 5 at 9:58
Please set 'MAGE_MODE' to production in env.php file. 'MAGE_MODE' => 'production'.
– Sunny Rahevar
Aug 5 at 9:58
Hello @SunnyRahevar Thanks for your reply I have checked MAGE_MODE and it is already 'MAGE_MODE' => 'production',
– Aditya Shah
Aug 5 at 10:01
Hello @SunnyRahevar Thanks for your reply I have checked MAGE_MODE and it is already 'MAGE_MODE' => 'production',
– Aditya Shah
Aug 5 at 10:01
add a comment |
1 Answer
1
active
oldest
votes
sometime problem happens when running the sitemap generation through bin/magento cron:run
from outside of the magento directory.
- e.g our magento code is in
/var/www/src
, if I runphp src/bin/magento cron:run
from/var/www
the urls will contain src as part of the
baseurl. - Running from the magento directory, e.g
php bin/magento cron:run
from/var/www/src
, works as expected. - Running from ADMIN UI - Site generate will also works as expected.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284414%2fmagento-2-2-8-sitemap-xml-contains-pub-dir-in-the-url-it-should-be-without%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
sometime problem happens when running the sitemap generation through bin/magento cron:run
from outside of the magento directory.
- e.g our magento code is in
/var/www/src
, if I runphp src/bin/magento cron:run
from/var/www
the urls will contain src as part of the
baseurl. - Running from the magento directory, e.g
php bin/magento cron:run
from/var/www/src
, works as expected. - Running from ADMIN UI - Site generate will also works as expected.
add a comment |
sometime problem happens when running the sitemap generation through bin/magento cron:run
from outside of the magento directory.
- e.g our magento code is in
/var/www/src
, if I runphp src/bin/magento cron:run
from/var/www
the urls will contain src as part of the
baseurl. - Running from the magento directory, e.g
php bin/magento cron:run
from/var/www/src
, works as expected. - Running from ADMIN UI - Site generate will also works as expected.
add a comment |
sometime problem happens when running the sitemap generation through bin/magento cron:run
from outside of the magento directory.
- e.g our magento code is in
/var/www/src
, if I runphp src/bin/magento cron:run
from/var/www
the urls will contain src as part of the
baseurl. - Running from the magento directory, e.g
php bin/magento cron:run
from/var/www/src
, works as expected. - Running from ADMIN UI - Site generate will also works as expected.
sometime problem happens when running the sitemap generation through bin/magento cron:run
from outside of the magento directory.
- e.g our magento code is in
/var/www/src
, if I runphp src/bin/magento cron:run
from/var/www
the urls will contain src as part of the
baseurl. - Running from the magento directory, e.g
php bin/magento cron:run
from/var/www/src
, works as expected. - Running from ADMIN UI - Site generate will also works as expected.
edited Aug 5 at 12:00
answered Aug 5 at 11:55
Aditya ShahAditya Shah
5,1172 gold badges12 silver badges45 bronze badges
5,1172 gold badges12 silver badges45 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284414%2fmagento-2-2-8-sitemap-xml-contains-pub-dir-in-the-url-it-should-be-without%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Please set 'MAGE_MODE' to production in env.php file. 'MAGE_MODE' => 'production'.
– Sunny Rahevar
Aug 5 at 9:58
Hello @SunnyRahevar Thanks for your reply I have checked MAGE_MODE and it is already 'MAGE_MODE' => 'production',
– Aditya Shah
Aug 5 at 10:01