Is it better to add an HTML redirection or to do PHP redirection?
How is redirection done using PHP?
PHP Redirection
Started by dirkfirst, Jun 22 2006 03:24 PM
5 replies to this topic
#1
Posted 22 June 2006 - 03:24 PM
|
|
|
#2
Posted 22 June 2006 - 03:56 PM
in php its simple:
<?php
header("Location: http://google.com");
?>
simply put that on the top of your php page and change "http://google.com" to whatever.
#3
Posted 22 June 2006 - 06:22 PM
your browser will not cache the page if you do that tho.
use this if you want the browser to cache the page:
use this if you want the browser to cache the page:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://google.com");
?>
#4
Posted 23 June 2006 - 10:32 AM
I'd say PHP.
Isn't it better if the browser doesn't cache?
Isn't it better if the browser doesn't cache?
#5
Posted 23 June 2006 - 12:05 PM
depends on what your doing. If its a perm redirect it would be good if the browser cached the page.
But if you change it alot then no it will be a bad idea.
But if you change it alot then no it will be a bad idea.
#6
Guest_Kaabi_*
Posted 05 July 2006 - 06:44 PM
Guest_Kaabi_*
A PHP redirect looks a lot simpler than an HTML redirect. I thought it was going to be all complicated, but it wasn't.


Sign In
Create Account


Back to top









