развернуть проект nextjs (или reatjs) с динамическим URL на сервере IIS - PullRequest
0 голосов
/ 29 сентября 2019

https://fk8.ir/index https://fk8.ir/mag https://fk8.ir/mag/8/learncsharp, ...

У меня есть эти страницы и создайте в следующем js как развернуть и настроить этот проект на Windows Server 2016IIS?

когда страница обновления получает 404 не найден или 500, ... ошибка

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Static Assets" stopProcessing="true">
          <match url="([\S]+[.](html|htm|svg|js|css|png|gif|jpg|jpeg))" />
          <action type="Rewrite" url="/{R:1}"/>
        </rule>
        <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="^/(api)" negate="true" />
          </conditions>
          <action type="Rewrite" url="/{R:0}.html" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>
...