Magento site css not load after editing web/unsecure/base_url in core_config_data in mysql database

StackOverflow https://stackoverflow.com/questions/23455112

質問

Before changing in my database, my web/secure/base_url had as value www.foo.com/foo/ and my website loaded successfully. After change to www.foo.com css files are not loaded, I move back to my old value but result It's still the same, no css files are loaded. How can I fix it?

役に立ちましたか?

解決

If your site was located in foo.com/foo/ and you changed it to foo.com then there are two possible reasons;

One, your site with corresponding styles is located in a sub directory /foo/ and therefore altering the entry to foo.com won't load any styles unless your style sheets erc have been moved to the root level.

Secondly, you must have the trailing slash "/", so any entry in either the http or http fields in the core_config_data table should either be;

www.foo.com/

Or

www.foo.com/foo/

Hope that helps in some way.

Oh, and always clear the cache. Magento relies heavily on cache and I've been caught ou several times with this. Also goes without saying, but back up before making any changes :)

Good luck

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top