Help with redirect script

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

header("Location: "); // You can change the URL to
anything you want.

You will be redirected shortly



I want to name this index.html to have this redirect to a different
website. However, if I name it *.html it doesn't work. If I name it
*.php it works fine. How come the simple php file will not work inside
of this html file?

Re: Help with redirect script

John wrote

Quoted text here. Click to load it

Because the server must be told to treat it as PHP.  Normally .php files
are treated as PHP and .html files aren't.  This can be configured
otherwise, but is not usually recommended or necessary.

Why not just save it as index.php?

Charles Sweeney

Site Timeline