Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How To Redirect A Page


  • Please log in to reply
7 replies to this topic

#1 Martel

Martel

    Drfixup Human Internet Solutions


  • Members
  • 1,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina U.S.A.
  • Local time:06:22 AM

Posted 08 May 2007 - 05:43 PM

I am wanting to have a page automatically redirect the visitors to another page.
Thanks in advance

Moderator Edit: Moved topic to more appropriate forum. ~ Animal

Edited by Animal, 08 May 2007 - 06:43 PM.


BC AdBot (Login to Remove)

 


#2 Andrew

Andrew

    Bleepin' Night Watchman


  • Moderator
  • 8,260 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:Right behind you
  • Local time:03:22 AM

Posted 08 May 2007 - 07:44 PM

Put the following code between the <head>and </head> tags of your HTML document:

<meta http-equiv="refresh" content="10;url=foo.html" />


In the above code, 10 is the number of seconds to wait before redirecting and foo.html is the page to which the user will be redirected. You can change these to whatever you need it to be. So, your page would look something like this:

<html>
<head>
<title>Redirection</title>
<meta http-equiv="refresh" content="10;url=foo.html" />
</head>
<body>
<p>You Will Be Redirected in ten seconds</p>
</body>
</html>

Edited by Amazing Andrew, 08 May 2007 - 07:46 PM.


#3 Martel

Martel

    Drfixup Human Internet Solutions

  • Topic Starter

  • Members
  • 1,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina U.S.A.
  • Local time:06:22 AM

Posted 08 May 2007 - 08:05 PM

Thanks again for the help.
:thumbsup:

#4 Martel

Martel

    Drfixup Human Internet Solutions

  • Topic Starter

  • Members
  • 1,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina U.S.A.
  • Local time:06:22 AM

Posted 08 May 2007 - 08:30 PM

I added
<html>
<head>
<title>Redirection in progress</title>
<meta http-equiv="refresh" content="10;url=foo.html">

and also tried

<meta http-equiv="refresh" content="10;url= [url="http://www.fooboo.com/foo.html""]http://www.fooboo.com/foo.html"[/url] >
</head>
<body>
<p>You Will Be Redirected in ten seconds</p>
</body>
</html>

on both I got 404

fooboo.com being the site
and
foo.html being the filename

maybe I typed something wrong?

#5 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:22 AM

Posted 08 May 2007 - 09:25 PM

Just to clarify, you used your real domain and html page, right?

#6 Martel

Martel

    Drfixup Human Internet Solutions

  • Topic Starter

  • Members
  • 1,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina U.S.A.
  • Local time:06:22 AM

Posted 09 May 2007 - 09:30 AM

yes I did

here it is again names changed for clarification
<html>
<head>
<title>Redirection in progress</title>
<meta http-equiv="refresh" content="10;url=myfilename.html">

and also tried

<meta http-equiv="refresh" content="10;url= http://www.mydomainname.com/myfilename.html" >
</head>
<body>
<p>You Will Be Redirected in ten seconds</p>
</body>

If it matters I entered only the above in notepad then saved as filename.html
as the redirect page

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:05:22 AM

Posted 09 May 2007 - 02:00 PM

The only other thing I can think of is that you are having a path problem. The first example will only work if both html pages are are in the same directory. I'm not sure why your second example isn't working, unless the html page is not where the server expects it to be.

#8 Martel

Martel

    Drfixup Human Internet Solutions

  • Topic Starter

  • Members
  • 1,469 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina U.S.A.
  • Local time:06:22 AM

Posted 09 May 2007 - 02:32 PM

It is working! :thumbsup:

Thanks again, I am not sure what I was doing wrong but I would save it in notepad with a .html name
and then copy it to my server and it asked to overwrite but didn't work.

Then I noticed a page with filename.html.html (typo on my part )
So I saved my notepad .html file in a new directory then copied that one to the server (it did not have a file to overwrite).

And it works.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>





<title>The Page you are accessing has moved</title>
</head>

<title>Redirection in progress</title>
<meta http-equiv="refresh" content="10;url=filename.html">


<body>
<p>Hang on you will be redirected in ten seconds</p>




</center>


</body>
</html>

:flowers:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users