首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >刷新缓存后,重定向的URL不更新内容

刷新缓存后,重定向的URL不更新内容
EN

Stack Overflow用户
提问于 2021-07-31 18:31:10
回答 1查看 23关注 0票数 0

我们使用WordPress为我们合作的货币化网络提供app-ads.txt。它位于index.php所在的根文件夹中。我们还使用重定向将包含www的url转发到不包含www部分的url。下面是.htaccess文件。但在更新ads.txt的内容并刷新缓存以立即应用更改后,我们只能看到我们网站的非www版本的更改,www版本的网站在2-3天后更新内容。

代码语言:javascript
复制
# BEGIN GD-SSL
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_USER_AGENT} ^(.+)$
RewriteCond %{SERVER_NAME} ^www\.oursiteurl\.com\.tr$ [OR]
RewriteCond %{SERVER_NAME} ^9k5\.198\.oursiteurl\.com$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
Header add Strict-Transport-Security "max-age=300"
Header always set Content-Security-Policy "upgrade-insecure-requests"
</IfModule>
# END GD-SSL

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
# BEGIN FRedirect_ErrorDocument
# The directives (lines) between "BEGIN FRedirect_ErrorDocument" and "END FRedirect_ErrorDocument" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
ErrorDocument 404 /index.php?error=404
# END FRedirect_ErrorDocument
EN

回答 1

Stack Overflow用户

发布于 2021-07-31 21:35:32

如果使用cloudflare,请清除自定义缓存yoururl.com/ads.txt并对其进行测试

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68604827

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档