Wordpress-Index.php已下载而不是显示

Wordpress-Index.php已下载而不是显示,php,wordpress,.htaccess,Php,Wordpress,.htaccess,我遇到了一个网站加载index.php文件而不是显示它的问题 可能是由于.htaccess文件,但我无法确定是哪一行导致了问题 我在很多论坛上找到了很多解决方案,但不太可能什么都不起作用。我还试图重新安装wordpress,但问题再次出现 你能帮忙吗 这是我的.htaccess文件: # BEGIN W3TC Browser Cache <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/css te

我遇到了一个网站加载index.php文件而不是显示它的问题

可能是由于.htaccess文件,但我无法确定是哪一行导致了问题

我在很多论坛上找到了很多解决方案,但不太可能什么都不起作用。我还试图重新安装wordpress,但问题再次出现

你能帮忙吗

这是我的.htaccess文件:

# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
    <IfModule mod_mime.c>
        # DEFLATE by extension
        AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
</IfModule>
<FilesMatch "\.(html|htm|rtf|rtx|svg|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|TXT|XSD|XSL|XML)$">
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
</FilesMatch>
<FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|WEBP|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
    <IfModule mod_headers.c>
         Header unset Last-Modified
    </IfModule>
</FilesMatch>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} =on
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule .* - [E=W3TC_SSL:_ssl]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* - [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* - [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =""
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
    RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN WordPress


Redirect 301 /feeds/posts/default /feed

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{QUERY_STRING} ^m=1$

RewriteRule ^(.*)$ /$1? [R=301,L]

</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
#开始W3TC浏览器缓存
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-jstext/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/jsonapplication/vnd.ms-access应用程序/vnd.ms-project应用程序/x-font-otf应用程序/vnd.ms-opentype应用程序/vnd.oasis.opendocument.database应用程序/vnd.oasis.opendocument.chart应用程序/vnd.oasis.opendocument.formula应用程序/vnd.oasis.opendocument.graphics应用程序/vnd.oasis.opendocument.presentationapplication/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2应用程序/vnd.ms-excel
#扩展放气
AddOutputFilter DEFLATE js css htm html xml
标头附加变量用户代理env=!不要改变
上次修改未设置的标题
#结束W3TC浏览器缓存
#开始W3TC页缓存核心
重新启动发动机
重写基/
RewriteCond%{HTTPS}=on
重写规则。*-[E=W3TC\U SSL:\U SSL]
RewriteCond%{SERVER_PORT}=443
重写规则。*-[E=W3TC\U SSL:\U SSL]
RewriteCond%{HTTP:Accept Encoding}gzip
重写规则。*-[E=W3TC\u ENC:\u gzip]
重写Cond%{HTTP_COOKIE}w3tc_预览[NC]
重写规则。*-[E=W3TC\u预览:\u预览]
重写cond%{REQUEST_METHOD}=邮递
RewriteCond%{QUERY_STRING}=“”
重写cond%{REQUEST_URI}\/$
重写cond%{HTTP_COOKIE}!(注释|作者| wp \-postpass | w3tc |注销| wordpress |登录| wptouch |开关|切换)[NC]
重写cond“%{DOCUMENT_ROOT}/wp content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/{index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC u ENC}”-f
重写规则。*“/wp content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/{index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}”[L]
#结束W3TC页缓存核心
#开始WordPress
重定向301/feed/posts/default/feed
重新启动发动机
RewriteCond%{QUERY_STRING}^m=1$
重写规则^(.*)$/$1?[R=301,L]
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
#结束WordPress

谢谢,

我想下面的链接可能会帮助您我想下面的链接可能会帮助您