6
To make it easy to understand the problem, I will call the site that had the redirect "A" and the destination "B"
A 301 redirect (instead of 302) was carried out from site A to site B without any expiration date, since the server was not sending the "expires" headers, the users that accessed at the time continue to be redirected to site B, even with the redirect . htaccess removed (default behavior of a 301 redirect).
However the site A is well accessed and in the time it was this way, some users accessed. Luckily both domains are properties that we have access to, however we cannot create another redirect (even 302) from site B to site A, to invalidate the previous in browsers that have already cached.
This technique works, however the site B is also very accessed.
I wonder if there is any way to clear this redirection in browsers that have cached, without user intervention.
One possible solution was to detect if the site B was accessed by site A and manage it by some PHP script for example (creating a redirect back, only when it had originated from site A, creating a loop that invalidates the cache). However I could not find any variable that could determine that the site has been redirected and its origin was the site A.
Updated
I received some responses to invalidate the cache, they work, however I can’t let the B domain redirect to A to invalidate the cache, because both are different sites and well accessed.
Is there any solution to this problem?
The answer works for different websites, just the . htaccess is on the site that will be redirected, I explained in the comment, if your site B was invaded (I didn’t understand how it might have been hacked), so you can point his DNS to a new hosting, since you should have access to the data as CNAME in the donimio log. If you don’t have the data then the problem isn’t about programming, but yes with something judicial, you will have to contact who manages the domain and maybe open a case (do not understand of legal), but depends on what occurred...
– Guilherme Nascimento
... Now this invasion story is that it’s too confusing, if it’s invaded the so-called invader can do whatever you want, or did you just lose access for another reason? Explain this better please.
– Guilherme Nascimento