Magento remove index.php from URL in IIS

go to Magento admin panel –> system –>configuration –>web –>Search Engines Optimization –> Use Web Server Rewrites –> Yes

create web.config file under magento root folder

add the following content to the file (tracing is optional)

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=”Magento SEO: remove index.php from URL”>
<match url=”^(?!index.php)([^?#]*)(\?([^#]*))?(#(.*))?” />
<action type=”Rewrite” url=”index.php/{R:0}” />
</rule>
</rules>
</rewrite>
<tracing>
<traceFailedRequests>
<add path=”*”>
<traceAreas>
<add provider=”WWW Server” areas=”Rewrite” verbosity=”Verbose” />
</traceAreas>
<failureDefinitions statusCodes=”404″ />
</add>
</traceFailedRequests>
</tracing>
</system.webServer>
</configuration>

Advertisements

2 comments on “Magento remove index.php from URL in IIS

  1. Hi,
    Thank you for your post, this helped me get started…
    Here is my full web.conf that worked for me.

    /*

    */

  2. Hi ,
    thank you for your post. I did the same and it gives me error 500.
    Any idea what am i doing wrong here?

    I have been told that IIS Url Rewrite module is installed on server So this config should work fine. but it is not.

    Many thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s