How to force to refresh a web page

I’m working on a web server.

BEFORE: There was a website. “domain.com/” redirected to “domain.com/index.html” (logic) and this page redirected to “domain.com/en/index.html” with the tag :
meta http-equiv=”refresh” content=”0;url=en/index.html”

Read More

NOW: There is a WordPress (I installed it), without index.html but an index.php.

THE PROBLEM: When I want to access to “domain.com”, I am redirected to domain.com/en/index.html.

I know it is a cache problem but how to disabled this cache. Redirection ?

I have found a solution about the htaccess (add Header set Cache-Control “max-age=0, no-cache, no-store, must-revalidate” ) but it doesn’t work.

Below the network analyzer
enter image description here

Related posts

2 comments

  1. I’m guessing this is actually a DirectoryIndex issue, not a cache one.

    If you look at the documentation, you see that this directive takes a list of indexes which Apache attempts to locate in order. Therefor, you can force priority for index.php by moving it to the front of the list

    DirectoryIndex index.php index.html
    
  2. If the redirect is a 301, then you need to use “Forget about this site” because 301 is a permanent redirect and will be saved in browser cache. A simple page reload will not refresh the cache.

    I’ve often stumble upon this scenario:

    foo.com redirects using 301 to bar.com, when you first visit foo.com, the browser will remember that redirect and the next time you visit foo.com, the browser will not even connect to foo.com, but instead connect directly to bar.com.

    @edit:
    It seems to be a 302 redirect.
    Just edit yourwebsite.com/index.html and change from meta http-equiv="refresh" content="0;url=en/index.html to meta http-equiv="refresh" content="0;url=en/index.php. Basically, change the extension from .html to .php in the refresh meta.

Comments are closed.