.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Programming
General Programming Help others and get yourself helped here!

Reply
 
Thread Tools
Auto-moving to another webpage
Old
  (#1)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Auto-moving to another webpage - 25-12-2003

When the new website is up at BU, i'd like to get my users moved instantly to this one when they go to my old site. Can someone post me the code for this?
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Auto-moving to another webpage - 25-12-2003

this is JavaScript... log out and in the forums, or do a forum search, so as to have displayed that "redirecting... click here if you do not wish to wait" page, then hit stop, and look at the page's HTML source...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#3)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Auto-moving to another webpage - 25-12-2003

lol, that's the way I do it too when I need such code


  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#4)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: Auto-moving to another webpage - 26-12-2003

Code:
<script language="JavaScript">
<!-- 
if( -1 == location.href.
           toLowerCase().
           indexOf('www.bots-united.com') )
{
  location.href = 'http://www.bots-united.com';
}
// -->
</script>
I figured this code works instantly for redirecting. It does not allow the users to read that they are redirecting. I also read somewhere in a book that you can do it with pure html though.

Anyway, i found this on the internet using mighty google the login->view source thingy gave me to much crap
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Auto-moving to another webpage - 27-12-2003

<meta http-equiv="Refresh" content="1; URL=http://realbot.bots-united.com">



[edited: don't forget the http:// else it won't work]



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."

Last edited by Pierre-Marie Baty; 27-12-2003 at 14:27..
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#6)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: Auto-moving to another webpage - 30-12-2003

If anyone cares,

Using ASP,
<%@ language="vbscript"%>
<%
Response.Redirect"'http://www.bots-united.com")
%>

Soon, I won't care either. I am going BACK to Unix/ Linux totally and leaving the
windows crap behind.

Last edited by Austin; 30-12-2003 at 02:36..
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#7)
raiden
Guest
 
Status:
Posts: n/a
Default Re: Auto-moving to another webpage - 02-01-2004

i think the meta tag is the best way (yes i use it, so i say work with metatags :>)

Last edited by raiden; 02-01-2004 at 02:34..
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#8)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: Auto-moving to another webpage - 06-01-2004

Quote:
Originally Posted by raiden
i think the meta tag is the best way (yes i use it, so i say work with metatags :>)
Yes, the meta tag is clean, BUT be aware of WHERE the redirect is hapenning,
at the server - BEFORE the browser knows about it
or
At the browser (client).

At the browser has a number of problems, with caching, with not wanting to do the redirect, with 2rd party software like add removal software that doesn't allow redirects, and on and on and on....

Last edited by Austin; 06-01-2004 at 12:12..
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#9)
Fierce Recon
Guest
 
Status:
Posts: n/a
Default Re: Auto-moving to another webpage - 11-01-2004

a php version:

PHP Code:
header("Location: http://www.php.net");
die(); 
but you can't write anything on the page (even a linebreak) or it'll give you a very nasty error.
  
Reply With Quote
Re: Auto-moving to another webpage
Old
  (#10)
dav
Guest
 
Status:
Posts: n/a
Default Re: Auto-moving to another webpage - 14-01-2004

also, last i looked, you don't even technically need the die() there - just make sure the header() is before any output on the page (as headers are sent before content, and thus any content locks in the current headers)
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com