Solved

meta http-equiv="refresh" DOESN'T WORK AT GOOGLE CHROME BROWSER

Posted on 2009-04-10
6
2,377 Views
Last Modified: 2013-12-12
Hi!
Can you help me with this ?  I have a page with a meta tag for refresh into another page regarding the url ID I have.  It works fine at IE, firefox, Safari but not in Google Chrome.
If your type in all other browsers :  www.justclick4.info/home.php?RecordID=1   goes to a page I have specify and if I type www.justclick4.info/home.php?RecordID=2 goes to an other page.
But in Google Chrome it doesn't.
<html><head><meta http-equiv="refresh" content="0;url=http://<?php echo $row_levels['link_stratol']; ?>?RecordID=<?php echo $row_levels['site_id']; ?>"></head>

Open in new window

0
Comment
Question by:SOUANI
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:oobayly
ID: 24114759
Seeing as you're using php and immediately redirecting the page, why don't you just do a 301 redirect.
This article explains about writing the Location header to redirect
http://www.phpf1.com/tutorial/php-redirect.html

Have a look at this w3c article explaining why you should use server side redirects.
http://www.w3.org/QA/Tips/reback
0
 

Author Comment

by:SOUANI
ID: 24114812
Thanks for the answer I know this redirect with Location Header but I how I will put t :  http://<?php echo $row_levels['link_stratol']; ?>?RecordID=<?php echo $row_levels['site_id']; ?>"> in the place of the url of the redirect ?   YOu cant write it like this. This works only inside html tags.

I dont know the right syntax.  I can do it with plain url ig. www.justclick4.info/index.php but I want to retrieve the url for my database

thank you
Penelope
0
 

Author Comment

by:SOUANI
ID: 24114851
to help you figure out what I am trying to do please see this:

How to write correct this code ?
<?php
    header('Location:http://$row_levels['statol_level']?RecordID=$row_owners['site_id']');
    die();
   
?>

like this I am getting an error
thank you ..

0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 15

Expert Comment

by:oobayly
ID: 24115111
Just concatenate the variables:
<?php
  header('Location:http://' . $row_levels['statol_level'] . '?RecordID=' . $row_owners['site_id']);
  die();
?>

Open in new window

0
 

Author Comment

by:SOUANI
ID: 24121049
Hi!

I have put the suggested code but as you can see yourself it doesn't work.  url:  www.justclick4.info/home.php?RecordID=1

The url in my db are like this :  www.justclick4.info/index5.php (this is the field statol_level in table levers in mysql.
I assume I have them correct as the code you send me is like this Location:http://' . $row_levels['statol_level'] . '?RecordID=' . $row_owners['site_id']);

thank you
0
 
LVL 15

Accepted Solution

by:
oobayly earned 500 total points
ID: 24121582
Can you give a few examples of what the statol_level & site_id are, and what url you want them to redirect to?
I can't quite follow how you expect "www.justclick4.info/index5.php" to change to " www.justclick4.info/home.php" without any string manipulation.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question