0
我的單頁應用程序index.html位於子文件夾中。我希望人們在訪問根網址時看到它。這個重寫規則中缺少的是什麼?將子URL調用重寫到子文件夾
<rewrite>
<rules>
<rule name="SPA rewrite">
<match url="http://app.local" />
<action type="Rewrite" url="http://app.local/SPA/dist" />
</rule>
</rules>
</rewrite>
您是否在同一個應用程序中有其他內容或資源。您可以添加其他內容嗎?例如,你是否有一些動態的內容api /產品/東西等也從應用程序提供或它只是靜態網站?根據條件規定,我們可以制定規則,而不會影響網站中的任何其他內容(動態和靜態)。 –