我不知道我的wordpress文件出了什么问题,当我试图在下载后打开一个文件时,下载的文件被压缩为单一格式,如:
<?php/** * The Header for our theme. * * Displays all of the <head> section and everything up till <div id="main"> *
实际文件如下所示:
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
问题是,当我尝试上载新文件时,文件也被压缩了,无法正常工作。我已经安装了WP Super Cache插件来缓存页面,以便通过缓存提高页面加载速度,我不确定这一切背后是否有这个插件。
我在htaccess文件中添加了一些代码,而不是wp super cache:
RewriteEngine On
RewriteBase /blog/
# here are few rewrite rules for 301 permanent redirect
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
Header unset ETag
FileETag None
<filesMatch "\\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, private"
Header set Expires "Sun, 23 October 2011 20:00:00 GMT"
</filesMatch>
<filesMatch "\\.(css|css.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\\.(js|js.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\\.(xml|txt)$">
Header set Cache-Control "max-age=216000, private, must-revalidate"
</filesMatch>
<filesMatch "\\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesMatch>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
谁能帮我一下我做错了什么。。
UPDATE: