Magento robots.txt file content

2014-01-30 21:52:13Damodar Bashyal

 

From today onwards I am going to apply these rules to fix issues with SEO.

Magento admin / System / configuration / General / Web / Auto-redirect to Base URL / Yes (301 Moved Permanently)

Also, add robots.txt file with below content.

More»

TAGS:Magento

 

 

Magento product images duplicate issue with CSV product importer

2014-01-27 21:05:54Damodar Bashyal

 

Magento duplicate image issue and solution

Our client likes to leave images on media/import folder and when they import csv, if product image already existed, it was creating duplicate image.

So below is a quick workaround to fix this issue. Here we are just deleting previous images if we are going to re-import them again.

More»

TAGS:Magento

 

 

Magento upgrade from 1.5.0.1 to 1.8.0.0 steps, issues and solutions

2014-01-23 18:07:53Damodar Bashyal

 

This is raw copy from my notes during magento store upgrade.

======================================= Restrict access to /index.php with IP Address whitelist.

This is what I have:

if (file_exists($maintenanceFile)) {
    // START IP BLOCKER
    // Remove file 'maintenance.flag' when you decide to go live
    $ip_whitelist = array('x.x.x.x', '127.0.0.1', 'x.x.x.x');
    if(!in_array($_SERVER['REMOTE_ADDR'], $ip_whitelist)) {
        $protocol = "HTTP/1.0";
        if ( "HTTP/1.1" == $_SERVER["SERVER_PROTOCOL"] )
          $protocol = "HTTP/1.1";
        header( "$protocol 503 Service Unavailable", true, 503 );
        header( "Retry-After: 3600" );
        header('Location: /index_landingpage.php'); // our own custom landing page.
        exit;
    }
    // END IP BLOCKER
    include_once dirname(__FILE__) . '/errors/503.php';
    exit;
}

More»