【发布时间】:2019-12-28 10:18:45
【问题描述】:
我对模板文件进行了更改,通过 ftp(或通过管理面板)上传它们。在管理面板中,块的代码发生了变化,但站点本身并没有改变。为什么?
我试过了:
- 通过modx管理面板清除缓存-》管理-清除 缓存”
- 删除缓存文件夹,该文件夹位于“core\cache” 目录
- 我尝试完全删除模板文件夹以检查是否存在 会有变化。
- 修改 .htaccess 文件
这些都没有帮助。管理面板发生了变化,但一切都保持原样
关于 MODX 革命 2.6.5 的网站 在服务器(托管)的设置中,写的是使用 Apache 2.* 和 PHP 7.1
这是 .htaccess 文件
# MODX supports Friendly URLs via this .htaccess file. You must serve web
# pages via Apache with mod_rewrite to use this functionality, and you must
# change the file name from ht.access to .htaccess.
#
# Make sure RewriteBase points to the directory where you installed MODX.
RewriteRule ^.*[-/]v(\d+)-.*$ index\.php?id=$1&%{QUERY_STRING} [L]
RewriteRule ^v(\d+)-.*$ index\.php?id=$1&%{QUERY_STRING} [L]
RewriteRule ^k(\d+)[-/].*[-/]v(\d+)-.*$ index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^k(\d+)[-/]v(\d+)[-/].*$ index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^v(\d+)[-/].*[-/]k(\d+)[-/].*$ index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^v(\d+)[-/]k(\d+)[-/].*$ index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]v(\d+)[-/]k(\d+)[-/].*$ index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]v(\d+)[-/].*[-/]k(\d+)[-/].*$ index\.php?id=$2-$1&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]k(\d+)[-/].*[-/]v(\d+)[-/].*$ index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteRule ^.*[-/]k(\d+)[-/]v(\d+)[-/].*$ index\.php?id=$1-$2&%{QUERY_STRING} [L]
RewriteEngine On
RewriteBase /
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
#php_flag register_globals Off
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
#ExpiresActive On
#ExpiresByType image/gif A2592000
#ExpiresByType image/jpeg A2592000
#ExpiresByType image/png A2592000
#BrowserMatch "MSIE" brokenvary=1
#BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
#BrowserMatch "Opera" !brokenvary
#SetEnvIf brokenvary 1 force-no-vary
怎么办? 也许有人遇到过类似的?
【问题讨论】:
-
你的浏览器缓存怎么样?你怎么冲洗它?是只有一大块还是全部都有问题?你怎么称呼他们?我的意思是这样 - [[!...]]?每个资源都有“可缓存”设置,那又如何呢?
-
@curveball 我清理了浏览器缓存,从多个浏览器登录。 chrome开发工具中的“禁用缓存”也已打开。这是所有块和整个模板的问题。我称这样的块为“[[$ ...]]”和类似的 [[!$ ...]]”。“可缓存”设置 - 我在哪里可以看到它?
-
它应该在“设置”选项卡上以及其他资源设置,例如它是否是容器等。docs.modx.com/revolution/2.x/making-sites-with-modx/…
-
@curveball 谢谢!如何将您的评论标记为答案?
-
很高兴听到它成功了 :) 我将其发布为答案。
标签: apache web content-management-system modx modx-revolution