Solved

how many methods are there to redirect to another page?

Posted on 2009-05-04
5
259 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 49

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 49

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 49

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now