I'v got a problem. Client has VPS and we transfered magento system to it.

The problem is that if for example path to magento is /var/www/magento and there is some file in it like /var/www/magento/file.js(for example) then on frontend it tries to load:


but not


How I can fix this?


Strange thing: CSS files are listed properly, but JS file use wrong path.


Check that var and media folders have write permissions. Give 777 rights on them and clear the contents of /var/cache of your Magento folder.


Check your .htaccess for a proper re-write setup. You may need to properly define the RewriteBase directive or modify RewriteRule settings. In either case references should not be absolute but instead relative to the docroot or HTTP URL, respectively.

Also the URL or SEO configuration may be mis-configured in Magento (disclosure: not intricately familiar with Magento so I'm not sure if it defines a site URL like Wordpress and Joomla do).

  • Redargind to magento all URL's are configured properly. Rewrite base is not used at all. The strange thing: CSS resources paths are proper, but js files are not properly listed! – Jevgeni Smirnov Dec 27 '11 at 6:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.