Solved

how many methods are there to redirect to another page?

Posted on 2009-05-04
5
283 Views
Last Modified: 2012-05-06
i am using an iis server, is there any method to redirect other than

header('location: c.php'); it is not working on my iis server but working on wamp server.
0
Comment
Question by:designersx
  • 3
  • 2
5 Comments
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 24301960
>> is there any method to redirect other than header('location: c.php');

Yes, you can try use javascript to make a page redirection, like:

<script language="javascript">
location.href = "c.php";
</script>


or use Meta Tag redirection, like:

<html>
<head>
<meta http-equiv="refresh" content="10; URL=c.php">
</head>
...
0
 
LVL 50

Accepted Solution

by:
Ryan Chong earned 50 total points
ID: 24301967
sorry, for immediate redirection, 2nd method should be as:

<meta http-equiv="refresh" content="0;URL=c.php">
0
 

Author Comment

by:designersx
ID: 24302005
thanks
0
 

Author Comment

by:designersx
ID: 24302011
sir what is the meaning of this that we generally say,

 
header should be posted first before any output. can u give a small example understanding this?

0
 
LVL 50

Expert Comment

by:Ryan Chong
ID: 24302077
>>header should be posted first before any output

you mean in php?

basically it means we cannot write any output (example using echo command) to the page before the command "header" in php, because the header information already been modified.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

808 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