Friday, October 23, 2015

Magento: How to remove index.php from URL in IIS

First you need create web.config file under magento root folder then copy below into web.config


<?xml version="1.0" encoding="UTF-8"?>

<configuration>
 <system.webServer>
  <rewrite>
   <rules>
    <rule name="MYRule" stopProcessing="true">
    <match url=".*" ignoreCase="false" />
    <conditions>
    <add input="{URL}" pattern="^/(media|skin|js)/" ignoreCase="false" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Rewrite" url="index.php" />
   </rule>
   </rules>
  </rewrite>
 </system.webServer>
</configuration>

No comments:

Post a Comment