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
pubshould never be in path on correctly configured Magento instance.dudzio– dudzio2021-05-31 07:18:29 +00:00Commented May 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 thatGohil Rajesh– Gohil Rajesh2021-05-31 07:23:06 +00:00Commented May 31, 2021 at 7:23
-
Yes it was cache related error. it fixed automatically after cache was disabledsourabh yadav– sourabh yadav2021-06-01 13:06:14 +00:00Commented Jun 1, 2021 at 13:06

example.comas domain mask?pubdirectory inside URL, becauseMAGE_ROOT/pubshould be your default root location in vhost config file (root $MAGE_ROOT/pub;if you use nginx).