Magento CSS & JS Paths Incorrect After Server Move - Tried Clearing Cache - magento

I'm having a strange problem with a server move. We've recently moved from a development server to the live sever with a website. However upon moving to our new server domain.com, we've developed an issue.
Basically the CSS and the JS aren't loading. Looking at the source code, the issue is clear - no trailing slash at the end of domains, so for example, the favicon URL is this:-
http://domain.commedia/favicon/default/favicon.gif
A google search threw this issue up - Magento Admin CSS and JS paths incorrect after moving server and product pages empty? - and, whilst I've followed these steps, there is still the issue.
Any suggestions will be greatfully appreciated.

Are you 100% sure that your web/unsecure/base_url and web/secure/base_url configurations are correct? Make sure your new site (on the new host) is connecting to the correct database (look in app/etc/local.xml), and verify these values directly in the core_config table. Your urls should have a trailing forward slash /, like http://domain.com/
If you can access the Magento admin, disable all caching under System > Cache Management
Are you using memcached on the new server? Try restarting the memcached service using shell: service memcached restart as it can cache Magento configurations.
Make sure you delete everything under var/cache, and double check that it was deleted.
Disable all 3rd party extensions. They could be affecting the path of your CSS files. you can disable them by removing the XML files under app/etc/modules

Related

Magento sub-domain redirecting to main domain even in separate server and DB

I have live magento site yyy.com configured using nginx in linux AWS AMI its using AWS RDS for database.
For the development purpose i have created the development server from the current live server image and for the development purpose
i have created a sub-domain dev.yyy.com and for the development also i created a new RDS server and the dumped the live server databases content.
I have changed both the secure to insecure URL from yyy.com to dev.yyy.com in the core-config-data and upadted the dev database details in the local.xml
config file also and clear the cache and session folder.
The issue is if I load the dev.yyy.com means its taking me to yyy.com.
I put new index.php containing "Hi this test"vinstead of magento index.php in the dev.yyy.com root directory means i can see Hi this test in the browser when i load dev.yyy.com.
Is there any configuration in nginx like return or redirect to resolve this issue.
and if anyone tell me this nginx related problem or magento files related problem. It will be very helpful for me to check further.
I working on this 2 days.
I would check all the values in core_config_data to see if yyy.com is still in there. You may have missed a config or there could be a customization redirecting you.
Also check your .htaccess for any redirect rules that shouldn't be there.
Also make sure you've cleared the contents of var/cache/ and var/full_page_cache/.

URL rewrites do not work after moving Magento installation to new server

After duplicating our web store onto a new server, copying the database over and changing the base url/safe base url in the db, all we get from the copied installation is the front page. That is, no custom url redirects work (for products, the admin panel, etc.), they all result in a 404 (and not the magento 404, the server default). Do you have any ideas what I could check out? Could there be an issue with one of the libraries included in magento?
I tried reindexing with /shell/indexer.php - which executed successfully but didn't fix the redirects.
Any ideas? Note I cannot access the admin panel via /admin because of this issue.
Edit: solution was .htaccess file missing in root directory
I added the sample htaccess file from the magento installation (I uploaded a copy in case someone finds it useful: http://sdrv.ms/13mw8Ok), and mod_rewrite was activated the next time I visited the site.
Make sure your vhosts file is setup correctly to allow mod_rewrite
Make sure your .htaccess file is setup correctly
How to enable mod_rewrite for Apache 2.2
You can access your admin through /index.php/admin in the meanwhile.

Magento Use Web Server Rewrites in Multi Domain Setup

I have to two stores each having different domain. They are hosted on dedicated server with SuExec disabled. I have copied the .htaccess and index.php and everything works fine.
The problem I am having is with my 2nd store Web Server Rewrites. As soon I enabled this for the 2nd store which is using symbolic link to the root directory, it starts giving page not found error.
domain2.com/index.php/abc.html ----- Works Fine with Use Web Server Rewrites Turned Off
domain2.com/abc.html ----- Does not work with Use Web Server Rewrites Turned ON
The base store works without any problem.
Any help is much appreciated.
Farrukh Khan
-> Flush The Magento Cache
Goto System->Cache Management
Refresh the catalog rewrites
Goto All Cache and change drop down to Refresh.
Click save
On most server, this should take out the index.php in your URL’s.
If you are getting a 404 error, continue reading.
-> Fixed Mode_Rewrite Errors
Please check you webserver configuration.
Do you use Apache? Maybe there is something like "AllowOverride none" in your configuration which disables .htaccess-files (the .htaccess-file in your magento-root-directory defines the rewrite-rules).
The most common cause for this is that you have an incorrect .htaccess file in your ftp.
Goto the magentocommerce.com site and download the magento files again.
Extract the files, and ONLY upload the .htaccess file to your Magento root directory.
This should fix any problems related to enabling the use of web server rewrites in Magento.
I was facing the same problem above, but now i solved already. The main reason for that problem is .htaccess file. By replacing .htaccess file with magento default .htaccess file solve all the problem. Web Server Rewrites Turned on or off, you can do as you like.
After saving the configuration, don't forget to clear cache.

Magento 1.6.2.0 - admin and frontend calling https URL's incorrectly

I have recently downloaded a site from my hosting server to my localhost. I have set up everything on localhost to use the local db, however when I run the frontend, the image files don't load as Magento is looking for them under https:// instead of http://, the same goes for the entire back-end. The pages load in the backend but also no styles are applied as Magento is looking for them under https://. I'm not running secure_url, only unsecure_url on both back and frontend.
Here is a screenshot of Web Inspector.
How can I fix this?
// edit
Well, my backend is a mess, here is a screenshot of the Config->Web section, specifically the URLs:
It's always a good idea to clear out var/cache if you haven't done so already. Do you have a trailing slash on your base_url too?
If you already emptied your var/cache folder, there is one other possible source for your problem.
Go to System/Developer/ and disable Javascript Settings/Merge JavaScript Files and CSS Settings/Merge CSS Files. Then go to System/Cache and press the Flush JavaScript/CSS Cache button.
If there are no redirection-rules that redirect HTTP->HTTPS in .htaccess or httpd.conf, you can also check the configuration in Magento:
Magento Admin area: Menu -> System -> Configuration -> Web
There, too, you can configure secure/non-secure connection

Moved Joomla 1.7 Site to New Server. Admin works fine. No pages display

I've just moved a Joomla 1.7 site to a new server.
Administration back-end works fine. Configuration.php seems fine. Get "The requested document was not found on this server." for every page other than Home.
Must be talking to the database OK or I'd get an error. Could this be a problem with the PHP?
Thanks,
Andy
Did you clear joomla cache ?
Disable page and/or module caching.
Disable any plugin that optimizes "loading speed".
Try removing SEF URLs (Joomla! and any 3rd party extension).
If you are using a custom .htacess, then use an unmodified joomla one.
Disable some system plugins.
Disable modules in the homepage.
Have you tried using another template (site) ?
You have Seach Engine Friendly URLs enabled in /administrator/ area's global configuration settings. You have probably enabled the option to use the mod_rewrite function which removes the /index.php/ portion of the urls.
It is a requirement of this mode that you have the .htaccess file in place in the root of your site. You probably had this correctly configured on your development server but perhaps forgot to move the file across when you went live. Some FTP programs hide dot files (files starting with a leading dot in the filename) so depending upon how you transferred the files (I'm guessing manually with FTP rather than Akeeba backup or similar) the file may have been missed. Look through your FTP client's options/preferences for an option to show/hide hidden files.
Failing this - the file could be correctly in place - but if you were developing in a sub-folder on your development server you would have set the RewriteBase line to your /sub-folder/
RewriteBase /sub-folder/
Now you've moved to the live server this line could be incorrect. If this is the case, edit the file to Read
RewriteBase /
Chances are it is one or other of these issues - missing .htaccess file or incorrect RewriteBase. A third and nowadays somewhat more unlikely option is that your server doesn't have mod_rewrite enabled - but I think that would result in server 500 errors.
Check whether you are using any modules that is calling database and you have not changed DB details in that module after migration. If admin panel is working fine then I think problem with some modules that are used in front-end. You can do debugging by disabling few suspected modules and check whether your site works fine or not. Else provide some more information about your site so that I can check further.

Resources