tags:

views:

663

answers:

2

How would I do this in PHP?

Server.Transfer("/index.aspx")

(add ';' for C#)

EDIT:

It is important to have the URL remain the same as before; you know, for Google. In my situation, we have a bunch of .html files that we want to transfer and it is important to the client that the address bar doesn't change.

A: 

The easiest way is to use a header redirect.

header('Location: /index.php');

Edit: Or you could just include the file and exit if you don't want to use HTTP headers.

tj111
Not actually the same as Server.Transfere, since Server.Transfere doens't change the header.
Filip Ekberg
+2  A: 

As far as I know PHP doesn't have a real transfer ability, but you could get the exact same effect by using include() or require() like so:

require('/index.aspx");
TravisO
I was actually worked this out and was going to self answer this one but you beat me to it.
jrcs3