Skip to content

Add configuration settings for IIS (Windows) #1240

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

Merged
merged 2 commits into from
Jun 16, 2017
Merged

Add configuration settings for IIS (Windows) #1240

merged 2 commits into from
Jun 16, 2017

Conversation

AngeloAnolin
Copy link
Contributor

@AngeloAnolin AngeloAnolin commented Mar 11, 2017

Added web.config settings for those who would be using Internet Information Services (IIS) to host their VueJS app with Vue Router in History mode.

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never IIS so I can't really review this but it looks good to me to have more server configs

@yyx990803 yyx990803 merged commit 7646663 into vuejs:dev Jun 16, 2017
@AngeloAnolin AngeloAnolin deleted the patch-1 branch June 16, 2017 12:53
@josemadriz
Copy link

josemadriz commented Aug 22, 2018

IIS setting should be.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Handle History Mode and custom 404/500" 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="index.html" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

as described here note that the difference is that index.html is determined as default page.
In case the application is served from a subdirectory
https://www.linkedin.com/pulse/hosting-vue-js-spa-build-microsoft-iis-zainul-zain/
for the application to work on IIS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants