FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » how do I create a redirect in a php file
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: how do I create a redirect in a php file [message #21886 is a reply to message #7275] Sat, 25 December 2004 06:23 Go to previous messageGo to previous message
phpistasty is currently offline  phpistasty   United States
Messages: 2
Registered: December 2004
Location: e-ville In
Karma:
Junior Member
Quote:

<?php
header('Location: http://www.mydomain.com/mynewindex.php');
?>


keep in mind that you can do this with php - it is server side, but put it at the top , to modify the header it has to come up before anything is sent back to the browser - probably your best bet since <meta > isn't fullproof - and most things i've seen which talk about meta refreshes say not to use it as a permanent redirect - .htaccess files work to , because you can still have the browser show the old path - but it actually references a different document , look for mod_rewrite on google


smldb:200k+
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Parse error in line 206
Next Topic: Pop window loads link # and store it in variable
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 10:29:30 GMT 2024

Total time taken to generate the page: 0.04199 seconds