Jump to content

header function vs. meta refresh tag on multiple servers (not spamming)


mottwsc

Recommended Posts

I have a PHP application that I'm separating into multiple servers to distribute the workload.  For example, there will be servers for logging in and servers for maintaining profiles, etc.  In general, I use a base page that has the PHP processing logic and then I include another page in it that displays the html for what the user sees.

 

I use a header function a good bit in the base pages to redirect the user to a new page based on what happens in the processing logic.  Since they are in the base page, they always occur before the header of the included page so they work fine.

header('Location: http://www.example.com/');

 

I have another part of the application where I need to refresh one of the included html pages because I'm displaying a timer that is counting down to an event.  When the countdown ends, the page refreshes.  I'm using a meta refresh tag for this, and the content value shown here as 0 is synched up with the timing of the event.

<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">

 

Now, because of the multiple servers, I'm trying to determine the best way to create a function that will allow me to redirect to different servers - using the meta refresh tag (which I will still need to use for the one page uses it now for the timers) or the header functions (which are embedded in the base code).  Maybe I need both because of where they are in the code.  My hesitation in using the meta refresh tag more is that, by using it in most/all of my pages for server redirection, I could get tagged by the search engines as a potential spammer.

 

Can anyone with experience in multiple server environments provide any guidance?

 

Thanks!

 

 

 

 

 

 

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.