Missing slash between base url and all links

2019-07-08 08:03发布

问题:

I have a really irritating problem with my magento installation. I have a magento(1.4.x) installed under www.domain.com address. I've cloned it to /beta/ directory to make an upgrade on test environment and also cloned database but i'm not able to resolve one simple-looking problem.

Every link on my test installation is missing a slash between base url and 'the rest' of URL so, for example, if magento tries to include a js file, URL to this file is rendered like this: www.domain.com/betajs/filetoinclude.js
instead of
www.domain.com/beta/js/filetoinclude.js.

I have edited URLs of my test environment in database, cleared cache and done all the other things poeople were suggesting on bulletin boards but i'm still missing this slash.

This problem is descibed a bit wider here: http://www.magentocommerce.com/boards/viewthread/234373

Have you any idea what can i do to make it working ? Thanks in advance.

回答1:

Recently i faced such problem.After deleting cache folder solve the issue.You can try either delete from cpanel or ftp or use below commands to remove cache.

Clear Cache and Temporaly files:

rm -rf downloader/pearlib/cache/*
rm -rf downloader/pearlib/download/*
rm -rf var/cache/*
rm -rf var/session/*
rm -rf var/report/*
rm -rf var/tmp/*

Additionally, if your catalog has changed over time, you may want to clean all image cache files.

rm -rf media/catalog/product/cache/*
rm -rf media/tmp/*


回答2:

Go to your admin panel > system > configuration > general > web > unsecure and make sure Base URL is http://www.domain.com/beta/ (notice: slash at the end of link) Do the same with system > configuration > general > web > secure

Hope this can solve your problem.



回答3:

In your system configuration in the Admin, make sure that you change your Store View under the Current Configuration Scope on the top left. Change to each option in that dropdown and check your Web settings for Unsecure and Secure URL settings. Chances are one of these is missing a trailing slash.



标签: magento