Remove index.php from Magento URL in windows server

To remove the index.php from URL in magento normally we will use htaccess. But, it will work in apache server only. So, to remove the index.php in windows server, we need to use the below code in web.config file.

Save the below code within the “web.config” file and upload it into your magento root directory.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite> 
<rules>
 
 
 
<rule name="Remove index.php Rule" stopProcessing="true"> 
<match url=".*" ignoreCase="false" /> 
<conditions> 
<add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" /> 
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> 
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> 
</conditions> 
<action type="Rewrite" url="index.php" /> 
</rule>
 
 
 
</rules>
</rewrite>
</system.webServer>
<system.net>
<mailSettings>
<smtp>
<network host="localhost" />
</smtp>
</mailSettings>
</system.net>
</configuration>

Change magento contact form FROM address as User contact address

  1. In magento we could set the contact from FROM address in admin under Admin->Configuration->Contact->Email Sender(Field)

  2. In our case, we cant able to send email from Same address like XXX@knowledgebags.com to XXX@knowledgebags.com. So, we need to change the email from address as like user emails address. So, we did as like below!
  3. //Copy
    /app/code/core/Mage/Contacts/controllers/IndexController.php
     //Copy above file Into below location: 
    /app/code/local/Mage/Contacts/controllers/IndexController.php
    //You can comment out line 97, don’t need that anymore:
    //->setReplyTo($post['email'])
     //Comment out line 100, the one causing the problem:
    //Mage::getStoreConfig(self::XML_PATH_EMAIL_SENDER),
     //Add a new line 101:
    array('email' => $post['email'], 'name' => $post['name']),
     //Save and you’re done!

4. Also, in my case Copy file into local folder not worked. So, we have did the test in /core folder itself and tested. Its worked fine.

NOTE: Also, we have changed all email sender admin as different address. For customer, order emails…etc

Magento configuration and Migration issues in windows server

We have faced below list of issues while using Magento in windows server.

  1. Magento 1.* PHP version should be 5.*
  2. url_rewrite – Need to use web.config based on IIS version
  3. In My case, url_rewrite not installed. To check this follow below steps.
    ->Start IIS Manager (Start >> Run, type inetmgr and hit enter).
    ->In IIS, select the Default Web Site.
    ->Under Features View, click URL Rewrite. (Its not displayed my case)
  4. Installed url_rewrite and fixed the issues.

    I will be continue soon….