I'm getting the wrong media, JS & CSS file path on the frontend and backend after installing Magento 2.4.2. Please review the below URLs we are getting. I've tried updating the value in the database core_config_data table, Also in-store configuration values.
1 Answer
You need to put url in core_config like "https://example.com/pub/static/"
it will help you
-
1It will work, but
pub
should never be in path on correctly configured Magento instance.– dudzioMay 31, 2021 at 7:18 -
then please remove value from that field. make it empty it will help you. dont forget to clear cache after that May 31, 2021 at 7:23
-
Yes it was cache related error. it fixed automatically after cache was disabled Jun 1, 2021 at 13:06
example.com
as domain mask?pub
directory inside URL, becauseMAGE_ROOT/pub
should be your default root location in vhost config file (root $MAGE_ROOT/pub;
if you use nginx).