forked from jiangguang5201314/WpDotNet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web.config
164 lines (154 loc) · 7.26 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71"/>
</configSections>
<!-- Default document for mod_mono -->
<appSettings>
<add key="MonoServerDefaultIndexFiles" value="index.php,index.aspx"/>
</appSettings>
<system.web>
<!-- Handler for mod_mono or Jexus or IIS classic mode -->
<httpHandlers>
<add path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
</httpHandlers>
<compilation targetFramework="4.0" debug="true"/>
<globalization responseEncoding="utf-8" fileEncoding="utf-8"/>
<httpRuntime requestPathInvalidCharacters="" requestValidationMode="2.0"/>
<pages validateRequest="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
</system.web>
<system.webServer>
<handlers>
<remove name="Phalanger"/>
<add name="Phalanger" path="*.php" verb="*" type="PHP.Core.RequestHandler, PhpNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71"/>
</handlers>
<!-- IIS URL Rewrite module settings for WordPress single-site -->
<!-- <rewrite>
<rules>
<rule name="Main Rule" 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.php/{R:0}" />
</rule>
</rules>
</rewrite> -->
<!-- IIS URL Rewrite settings for WordPress multi-site -->
<!-- <rewrite>
<rules>
<rule name="Rule 1" stopProcessing="true">
<match url="^index\.php$" ignoreCase="false"/>
<action type="None"/>
</rule>
<rule name="Rule 2" stopProcessing="true">
<match url="^([_0-9a-zA-Z-]+/)?files/(.+)" ignoreCase="false"/>
<action type="Rewrite" url="wp-includes/ms-files.php?file={R:2}" appendQueryString="false"/>
</rule>
<rule name="Rule 3" stopProcessing="true">
<match url="^([_0-9a-zA-Z-]+/)?wp-admin$" ignoreCase="false"/>
<action type="Redirect" url="{R:1}wp-admin/" redirectType="Permanent"/>
</rule>
<rule name="Rule 4" stopProcessing="true">
<match url="^" ignoreCase="false"/>
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false"/>
</conditions>
<action type="None"/>
</rule>
<rule name="Rule 5" stopProcessing="true">
<match url="^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*)" ignoreCase="false"/>
<action type="Rewrite" url="{R:1}"/>
</rule>
<rule name="Rule 6" stopProcessing="true">
<match url="^[_0-9a-zA-Z-]+/(.*\.php)$" ignoreCase="false"/>
<action type="Rewrite" url="{R:1}"/>
</rule>
<rule name="Rule 7" stopProcessing="true">
<match url="." ignoreCase="false"/>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite> -->
<defaultDocument>
<files>
<remove value="index.php"/>
<add value="index.php"/>
</files>
</defaultDocument>
<httpErrors errorMode="Detailed">
<clear/>
</httpErrors>
</system.webServer>
<phpNet>
<!-- Explicit paths settings applies for WordPress with bundled Phalanger
If your system has Phalanger installed, remove paths settings.
-->
<paths>
<set name="DynamicWrappers" value="bin/dynamic"/>
<set name="Libraries" value="bin"/>
</paths>
<compiler>
<set name="EnableStaticInclusions" value="true"/>
<set name="StaticIncludePaths" value="." />
<set name="WatchSourceChanges" value="true"/>
<set name="DisabledWarnings" numbers="180,181,121,125,151">
<add value="DeferredToRuntime"/>
<add value="CompilerStrict"/>
</set>
<set name="Debug" value="true" />
<!-- Performance improvement for WP.NET Professional -->
<set name="InclusionMappings">
<!-- In the pattern, \s means whitespace, " is a double quote, parenthesis marks the group indexed from 1.
n the value, $1 refers to the first group. -->
<add pattern="\AABSPATH[\s.]*['"]/?([^'"\$]+)['"]\Z" value="$1" />
<add pattern="\Adirname\(ABSPATH\)[\s.]*['"]/?([^'"\$]+)['"]\Z" value="$1" />
<add pattern="\Adirname\(\s*__FILE__\s*\)[\s.]*['"]/?([^'"\$]+)['"]\Z" value="./$1" />
<add pattern="\Adirname\(\s*dirname\(\s*__FILE__\s*\)\s*\)[\s.]*['"]/?([^'"\$]+)['"]\Z" value="../$1" />
<add pattern="\AABSPATH[\s.]*WPINC[\s.]*['"]/?([^'"\$]+)['"]\Z" value="wp-includes/$1" />
<add pattern="\AWP_CONTENT_DIR[\s.]*['"]/?([^'"\$]+)['"]\Z" value="wp-content/$1" />
<add pattern="\A['"]/?([^'"\$]+)['"]\Z" value="./$1" />
</set>
</compiler>
<classLibrary>
<clear/>
<add assembly="WpDotNet"/>
<add assembly="PhpNetClassLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" section="bcl"/>
<add assembly="PhpNetMySql, Version=4.0.0.0,Culture=Neutral,PublicKeyToken=2771987119c16a03" section="mysql"/>
<!-- Phalanger Professional Managed extensions -->
<!-- <add assembly="PhpNetCurl.dll, Version=4.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="curl" />
<add assembly="PhpNetXml.dll, Version=4.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="xml" />
<add assembly="PhpNetGd2.dll, Version=4.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="image" />
<add assembly="PhpNetZlib.dll, Version=4.0.0.0, Culture=neutral, PublicKeyToken=d4cd94916abb991b" section="zlib" />
-->
<!-- PHP Native extensions (Windows only) -->
<!-- <add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl"/>
<add assembly="php_xml.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="xml"/>
<add assembly="php_gd2.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image"/>
<add assembly="php_image.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="image"/>
<add assembly="php_zlib.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="zlib"/>
-->
</classLibrary>
<request-control>
<set name="ExecutionTimeout" value="240" phpName="max_execution_time"/>
</request-control>
<error-control>
<set name="DisplayErrors" value="true" phpName="display_errors"/>
</error-control>
<globalization>
<set name="PageEncoding" value="utf-8"/>
</globalization>
<bcl>
<mailer>
<!-- SMTP server name used for sending e-mails. -->
<set name="SmtpServer" value="127.0.0.1" phpName="SMTP"/>
<!-- SMTP server port used for sending e-mails. -->
<set name="SmtpPort" value="25" phpName="smtp_port"/>
<!-- The default value of "From" header. -->
<set name="DefaultFromHeader" value="[email protected]" phpName="sendmail_from"/>
</mailer>
</bcl>
</phpNet>
</configuration>