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 #6648 is a reply to message #6629] Sun, 20 October 2002 23:14 Go to previous messageGo to previous message
esm2002 is currently offline  esm2002   United States
Messages: 339
Registered: May 2002
Location: Atlanta Georgia
Karma:
Senior Member
sorry about not being clear on what I was looking for.

I have ocasssionaly had to move a page from one folder to another. When I have have done that in the past, I just replaced the original index.htm file with an index.htm file that had the following:

<!doctype HTML public "-//w3c//dtd HTML 4.0 transitional//en">
<HTML>
<HEAD>
<META HTTP-EQUIV=REFRESH CONTENT="8;URL=http://www.mysite.com/members.html">
</HEAD>
<BODY>
<P>&nbsp;</P><P>&nbsp;</P>
<CENTER>
<FONT SIZE="2" COLOR="1600A5" FACE=VERDANA><B>
You will automatically be redirected to the Message boards.
<BR><BR>
Or click the link if you can't wait!!!
</B></FONT> 
<a href="http://www.mysite.com/members/members.html">
<FONT SIZE="2" COLOR="1600A5" FACE=VERDANA><B>Message boards</B></FONT></a>
</CENTER>
</BODY>
</HTML>


If I move the forum, some folks will still be linked to:
http://www.mysite.com/fudforum/index.php
This index.php will load the forum. BUT since I have moved the index.php, I want to put a new index.php with the above code.

So, What would the code look like for the index.php to do the META refresh? How about the following? Would this work?

<?php
<!doctype HTML public "-//w3c//dtd HTML 4.0 transitional//en">
<HTML>
<HEAD>
<META HTTP-EQUIV=REFRESH CONTENT="8;URL=http://www.mysite.com/members.html">
</HEAD>
<BODY>
<P>&nbsp;</P><P>&nbsp;</P>
<CENTER>
<FONT SIZE="2" COLOR="1600A5" FACE=VERDANA><B>
You will automatically be redirected to the Message boards.
<BR><BR>
Or click the link if you can't wait!!!
</B></FONT> 
<a href="http://www.mysite.com/members/members.html">
<FONT SIZE="2" COLOR="1600A5" FACE=VERDANA><B>Message boards</B></FONT></a>
</CENTER>
</BODY>
</HTML>
?>


The META refresh option as used above will wait 8 seconds after loading before loading the URL that follows.

I appreciate your help and response...I learned enough PERL to be dangerous....guess I'm just going to have to do the same with PHP....<g>


Gene
"The older I get, the more I admire competence, just simple competence in any field from adultery to zoology."
[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: Thu Nov 07 12:23:45 GMT 2024

Total time taken to generate the page: 0.04916 seconds