Advertisement
Guest User

URL rewrite to fix IIS redirect for path based routing

a guest
Feb 6th, 2019
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3. <system.webServer>
  4. <rewrite>
  5. <rules>
  6. <clear></clear>
  7. <rule name="Redirect to specific directory">
  8. <match url="(.*)"/>
  9. <conditions >
  10. <add input="{PATH_INFO}" pattern="^(.*/)(.*)" />
  11. <add input="{REQUEST_FILENAME}" pattern="(.*?)\.(jpg|ico|gif|js|png|htm|css|html|htm|aspx)$" negate="true" />
  12. </conditions>
  13. <action type="Rewrite" url="{R:1}{C:2}/"/>
  14. </rule>
  15. </rules>
  16. </rewrite>
  17. </system.webServer>
  18. </configuration>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement