Skip to content

How to use it in iis or nginx after build? #6155

Answered by xc2
AlbertXiaoPeng asked this question in Q&A
Discussion options

You must be logged in to vote

modern.config.ts

set output.assetPrefix to /test/

web.config

<?xml version="1.0"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Static Site" stopProcessing="true">
          <match url=".*" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="/" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

if it doesn't work, please try changing the Rewrite url from / to /test/.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AlbertXiaoPeng
Comment options

Answer selected by AlbertXiaoPeng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants