Php 将htaccess转换为web.config
我正在尝试将此htaccess文件转换为webconfig,以便设置wordpress W3总缓存。当我激活minify时,它不断给我一个错误,它无法读取缓存文件夹的重写规则Php 将htaccess转换为web.config,php,wordpress,.htaccess,caching,web-config,Php,Wordpress,.htaccess,Caching,Web Config,我正在尝试将此htaccess文件转换为webconfig,以便设置wordpress W3总缓存。当我激活minify时,它不断给我一个错误,它无法读取缓存文件夹的重写规则 <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css M31536000 ExpiresByType application/x-javascript M31536000 </IfModule> &l
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css M31536000
ExpiresByType application/x-javascript M31536000
</IfModule>
<IfModule mod_mime.c>
AddEncoding gzip .gzip
<Files *.css.gzip>
ForceType text/css
</Files>
<Files *.js.gzip>
ForceType application/x-javascript
</Files>
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_setenvif.c>
SetEnvIfNoCase Request_URI \.gzip$ no-gzip
</IfModule>
</IfModule>
<IfModule mod_headers.c>
Header set X-Powered-By "W3 Total Cache/0.9.1.3"
Header set Vary "Accept-Encoding"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp-content/w3tc/min/
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* - [E=APPEND_EXT:.gzip]
RewriteCond %{REQUEST_FILENAME}%{ENV:APPEND_EXT} -f
RewriteRule (.*) $1%{ENV:APPEND_EXT} [QSA,L]
RewriteRule ^([a-f0-9]+)\/(.+)\.(include(\-(footer|body))?(-nb)?)\.[0-9]+\.(css|js)$ index.php?tt=$1&gg=$2&g=$3&t=$7 [QSA,L]
</IfModule>
过期于
ExpiresByType文本/css M31536000
ExpiresByType应用程序/x-javascript M31536000
AddEncoding gzip.gzip
强制类型文本/css
ForceType应用程序/x-javascript
setEnvifLocase请求\u URI\.gzip$无gzip
标题集X-Powered-By“W3总缓存/0.9.1.3”
标题集更改为“接受编码”
重新启动发动机
重写基/wp内容/w3tc/min/
RewriteCond%{HTTP:Accept Encoding}gzip
重写规则。*-[E=APPEND_EXT:.gzip]
RewriteCond%{REQUEST_FILENAME}%{ENV:APPEND_EXT}-f
重写规则(.*)$1%{ENV:APPEND_EXT}[QSA,L]
重写规则^([a-f0-9]+)\/(.+)\(包括(\-(页脚|正文))?(-nb)?\.[0-9]+\(css | js)$index.php?tt=$1&gg=$2&g=$3&t=$7[QSA,L]
是否有人能够使用IIS成功设置W3 Total缓存?您也可以这样做,因为W3C可能不需要工作
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<caching enabled="true" enableKernelCache="true" maxCacheSize="1000" maxResponseSize="512000"/>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^index.php$" ignoreCase="false" />
<action type="None" /></rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="." ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" /></rule>
</rules>
</rewrite>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="3.00:00:00" />
</staticContent>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"><scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="9" dynamicCompressionLevel="4" />
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="*/*" enabled="false" />
</dynamicTypes>
</httpCompression>
</system.webServer>
</configuration>