项目作者: LssPolymerElements

项目描述 :
Rewrites files server based off user-agent using IIS rewrite module.
高级语言: C#
项目地址: git://github.com/LssPolymerElements/Es2015-IIS-Rewrite-Provider.git
创建时间: 2017-07-07T03:43:17Z
项目社区:https://github.com/LssPolymerElements/Es2015-IIS-Rewrite-Provider

开源协议:MIT License

下载


Build status

This module will rewrite urls to the es5 folder if an es5 browser is detected or es6 if a es6 browser is detected.

  1. You must build and register Polymer2RewriteProviderX.dll and UAParser.dll to the GAC on the web server.
  2. You must the setup an IIS provider and add a provider setting with “,|” as a delimiter.

MORE DOCS ON HOW TO REGISTER AND SETUP THE PROVIDER

Sample rewrite rules for web.config

  1. <rule name="Polymer2ExtensionLessUrls" patternSyntax="Wildcard" stopProcessing="true">
  2. <match url="*.*" negate="true" ></match>
  3. <conditions>
  4. <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" ></add>
  5. <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" ></add>
  6. </conditions>
  7. <action type="Rewrite" url="{Polymer2Rewriter:INDEX,|{HTTP_USER_AGENT},|{QUERY_STRING},|{URL}}" ></action>
  8. </rule>
  9. <rule name="Polymer2Es5Es6Rewrite" stopProcessing="true">
  10. <match url="(.*)" ></match>
  11. <action type="Rewrite" url="{Polymer2Rewriter:FILE,|{HTTP_USER_AGENT},|{QUERY_STRING},|{URL}}" ></action>
  12. </rule>
  13. </rules>