mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
added rewrite rules for IIS, thx <h@reimu.pw>
This commit is contained in:
parent
ec78b27939
commit
f89b8efe04
@ -1,7 +1,9 @@
|
||||
RewriteEngine on
|
||||
RewriteBase /
|
||||
|
||||
RewriteRule ^([^/]*).json$ get.php?type=json&uname=$1 [L]
|
||||
RewriteRule ^(skin|cape)/([^/-]*)(|-)(|alex|steve).png$ get.php?type=$1&model=$4&uname=$2 [L]
|
||||
# 以下是可选内容
|
||||
# 同时支持 UniSkinAPI 和 CustomSkinLoader API
|
||||
RewriteRule ^(usm|csl)/([^/]*).json$ get.php?type=json&uname=$2&api=$1 [L]
|
||||
RewriteRule ^(usm|csl)/textures/(.*)$ textures/$2 [L]
|
||||
# 用于获取皮肤头像
|
||||
|
@ -42,7 +42,6 @@
|
||||
```
|
||||
rewrite ^/([^/]*).json$ /get.php?type=json&uname=$1 last;
|
||||
rewrite ^/(skin|cape)/([^/-]*)(|-)(|alex|steve).png$ /get.php?type=$1&model=$4&uname=$2 last;
|
||||
# 以下是可选内容
|
||||
rewrite ^/(usm|csl)/([^/]*).json$ /get.php?type=json&uname=$2&api=$1 last;
|
||||
rewrite ^/(usm|csl)/textures/(.*)$ /textures/$2 last;
|
||||
# 用于获取皮肤头像
|
||||
|
36
web.config
Normal file
36
web.config
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<staticContent>
|
||||
<mimeMap fileExtension="." mimeType="image/png" />
|
||||
<remove fileExtension=".woff"/>
|
||||
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
|
||||
<remove fileExtension=".woff2"/>
|
||||
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff2" />
|
||||
</staticContent>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="rule 1I" stopProcessing="true">
|
||||
<match url="^([^/]*).json$" />
|
||||
<action type="Rewrite" url="/get.php?type=json&uname={R:1}" />
|
||||
</rule>
|
||||
<rule name="rule 2I" stopProcessing="true">
|
||||
<match url="^(skin|cape)/([^/-]*)(|-)(|alex|steve).png$" />
|
||||
<action type="Rewrite" url="/get.php?type={R:1}&model={R:4}&uname={R:2}" />
|
||||
</rule>
|
||||
<rule name="rule 3I" stopProcessing="true">
|
||||
<match url="^(usm|csl)/([^/]*).json$" />
|
||||
<action type="Rewrite" url="/get.php?type=json&uname={R:2}&api={R:1}" />
|
||||
</rule>
|
||||
<rule name="rule 4I" stopProcessing="true">
|
||||
<match url="^(usm|csl)/textures/(.*)$" />
|
||||
<action type="Rewrite" url="/textures/{R:2}" />
|
||||
</rule>
|
||||
<rule name="rule 5I" stopProcessing="true">
|
||||
<match url="^avatar/(|[0-9]*/)([^/-]*).png$" />
|
||||
<action type="Rewrite" url="/get.php?type=avatar&uname={R:2}&size={R:1}" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user