Skip to content

Instantly share code, notes, and snippets.

@nurycaroline
Created September 4, 2017 14:56
Show Gist options
  • Save nurycaroline/dde1c54f5aa2ce7177423d1fe9270a58 to your computer and use it in GitHub Desktop.
Save nurycaroline/dde1c54f5aa2ce7177423d1fe9270a58 to your computer and use it in GitHub Desktop.
Configuração para reescrita de url IIS - Necessário instalação do IIS URL Rewrite
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="ReactRouter Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(docs)" negate="true" />
</conditions>
<action type="Rewrite" url="index.html" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
@middletecnologia
Copy link

Funcionou perfeitamente. A única observação que no meu caso tive que colocar o web config na pasta public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment