Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Re: Auto-Redirect
- Jörg Heinrich
February 4, 2004, 3:08 pm
rate this thread
It doesn't always work, no. Some browsers don't support it, some
(including IE, in an obscure part of the settings) can disable it.
There's also a number of usability problems (broken back button,
disorientating users with some disabilities, etc) with <meta>.
header("Location: http://www.example.com/new/location /");
If you're trying to redirect from
http://www.example.com/old.html to http://www.example.com/new.html
then you have two choices
1) Enable PHP parsing for HTML if your server supports it and your
admin will let you.
2) Delete old.html
Create a directory in the same place called old.html/
Put an index.php file in that directory that does the redirect
3) Not a PHP solution, but nicer than either of the above, *if* your
server supports it: Use .htaccess to do the redirect - plenty of
.htaccess tutorials about on the web.