Skip to content

Instantly share code, notes, and snippets.

@sabbour
Last active March 23, 2022 20:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save sabbour/e49b3ac9e1438c93d5fb to your computer and use it in GitHub Desktop.
Save sabbour/e49b3ac9e1438c93d5fb to your computer and use it in GitHub Desktop.
Magento IIS Web.config for URL Rewriting
<?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" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment