471,881 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,881 software developers and data experts.

how to redirect a webpage to another webpage using html code??

i want to redirect visitors from my old website url to a new url coz my website has been moved. how i can do it using html code??
Aug 8 '07 #1
7 3236
please reply someone.
Aug 8 '07 #2
drhowarddrfine
7,435 Expert 4TB
The only two ways to do it is with a link inserted into your home page to your new site or with "redirect" on your server.
Aug 8 '07 #3
The only two ways to do it is with a link inserted into your home page to your new site or with "redirect" on your server.
but i have seen mny websites that redirect in 5 seconds to a new webpge. how they do it??
Aug 9 '07 #4
drhowarddrfine
7,435 Expert 4TB
Ah, yes, the third way. Javascript.
Aug 9 '07 #5
i want to redirect visitors from my old website url to a new url coz my website has been moved. how i can do it using html code??
<meta http-equiv="refresh" content="0;url=http://www.yoursite.com/yourpage.html">

add this tag in<head>.
and how much time you want to redirect with another page edit in "content" part, it's in second.
Aug 9 '07 #6
drhowarddrfine
7,435 Expert 4TB
Very good. I had forgotten all about that.
Aug 9 '07 #7
Javascript Time Delay

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. <!--
  5. function delayer(){
  6.     window.location = "../javascriptredirect.php"
  7. }
  8. //-->
  9. </script>
  10. </head>
  11. <body onLoad="setTimeout('delayer()', 5000)">
  12. <h2 >Prepare to be redirected!</h2>
  13. <p>This page is a time delay redirect, please update your bookmarks to our new 
  14. location!</p>
  15.  
  16. </body>
  17. </html>
Source: http://www.tizag.com/javascriptT/javascriptredirect.php
Aug 9 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Don Miller | last post: by
1 post views Thread by Jac | last post: by
9 posts views Thread by postings | last post: by
56 posts views Thread by UKuser | last post: by
reply views Thread by YellowAndGreen | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.