Skip to content

StaticFileMiddleware for SelfHost #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spboyer opened this issue Apr 28, 2015 · 1 comment
Closed

StaticFileMiddleware for SelfHost #491

spboyer opened this issue Apr 28, 2015 · 1 comment

Comments

@spboyer
Copy link

spboyer commented Apr 28, 2015

Enabling in IIS is simple via web.config

<system.webServer>

<rewrite>
  <rules>
    <!--Redirect selected traffic to index -->
    <rule name="Index Rule" stopProcessing="true">
      <match url=".*" />
      <conditions logicalGrouping="MatchAll">
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
        <add input="{REQUEST_URI}" matchType="Pattern" pattern="^/api/" negate="true" />
      </conditions>
      <action type="Rewrite" url="/index.html" />
    </rule>
  </rules>
</rewrite>
</system.webServer>

Looking for middleware example to support StaticFile Server to host angular for example, in Kestrel or web self host

@Tratcher
Copy link
Member

@spboyer spboyer closed this as completed Oct 31, 2016
natemcmaster pushed a commit that referenced this issue Nov 14, 2018
Fix #502

Fix #492

Fix #491

Fix #486

Improves #489
ryanbrandenburg pushed a commit that referenced this issue Nov 22, 2018
…rs (#490)

Merged to unblock CI. cref #491 to update the packages with tags and real package descriptions
@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants