Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

(host)/var/www/magento/file.js

but not

(host)/magento/file.js

How I can fix this?

UPDATE 1

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

share|improve this question

2 Answers 2

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).

share|improve this answer
    
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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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