簡體   English   中英

舊版本的index.php正在服務

[英]Old version of index.php being served

更新我的一個客戶端站點后,當頁面加載時,css丟失。 在進一步調查后,我意識到我得到了最新的css文件,但是一個舊的index.php文件。

我嘗試清除chromes緩存,但似乎沒有改變任何東西。 在刷新時,新版本已提供,但我不希望我的客戶客戶必須硬刷新頁面。 我也嘗試刪除我的htaccess的緩存部分,但仍然沒有變化。

網站: https//thebossattorney.com

任何幫助表示贊賞。

.htaccess代碼


## Force SSL https ##
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
## End SSL https ##

## Remove trailing slash ##
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^(.*)/$ https://thebossattorney.com/$1 [R=301,L]
## End ##

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##

## Remove page extension ##
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
## End page extension ##

## error pages ##
ErrorDocument 404 /index.php
## end error pages ##

## set time zone ##
SetEnv TZ America/Detroit
## end timezone ##

## Set webmaster email ##
ServerSignature EMail
SetEnv SERVER_ADMIN admin@server.com
AddDefaultCharset utf-8
## End ##

## Specify a Vary: Accept-Encoding header ##
<IfModule mod_headers.c>
  <FilesMatch ".(js|css|xml|gz|html)$">
    Header append Vary: Accept-Encoding
  </FilesMatch>
</IfModule>
## End ##


更新06/23/19:經過幾個小時的挖掘,我還沒有找到解決辦法。 似乎只有index.php文件正在加載緩存版本。 無論我在第一次加載時清除瀏覽器緩存多少次,我都會獲得舊版本的index.php。 但是,所有JS和CSS文件都正在加載正確的文件。 我將尋找一種方法來使用Javascript在加載時重新加載頁面作為一種解決方法。 我在這里更新。

經過數小時的頭痛,終於解決了這個問題 事實證明,Bluehost有一個他們需要清除的服務器端緩存。 清除緩存后,服務器立即開始提供新版本的index.php

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM