Daxcor Posted March 11, 2020 Share Posted March 11, 2020 (edited) I am running a nginx web server. with this following config return 302 https://www.mysite.com/game_errorpage.php?sub=$name; The intent, is if someone types in "blah.mysite.com" and that subdomain (game server) is not running, I want them to be redirected to a error page. This error page then starts the game game server in question. This all works up to to this point. Then I want to redirect the user back to the original request url, to log into their game "blah.mysite.com" I use the following php header("Location: https://blah.mysite.com"); exit(); The issue I have is, because the browser has it cached already as https://www.mysite.com/game_errorpage.php?sub=$name it keeps returning there even though the game server is now running. The only thing I can do is close all the browsers and open a new window in Chrome using "Incognito" then type the url again. I have the following in my global file, for all pages. header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); So I am looking for some creative solutions. Thanks. Brad Edited March 11, 2020 by Daxcor Quote Link to comment Share on other sites More sharing options...
requinix Posted March 11, 2020 Share Posted March 11, 2020 302 is a temporary redirect that is not supposed to be cached unless the server says it can be cached. Make sure that redirect - the one from nginx - isn't also sending caching headers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.