Jump to content

redirect header & browser caching help


Daxcor

Recommended Posts

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 by Daxcor
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.