Closed Thread Icon

Preserved Topic: automatically forward the user (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=18007" title="Pages that link to Preserved Topic: automatically forward the user (Page 1 of 1)" rel="nofollow" >Preserved Topic: automatically forward the user <span class="small">(Page 1 of 1)</span>\

 
kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 06-21-2001 07:50

I read through my books but I can't find the useful stuff.

I need a function which forwards users to another page as sonn as they land on it.

there is the navigate(www.url.com); function but it's only good for IE3 and higher.

would window.onload=document.location.. something like that work? cuz me attempts weren't succesful at all!

k10

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-21-2001 08:21

Yes, you can do the javascript trick, or the "meta tag/http-equiv" trick (which i don't remember it's syntax)

as for javascript:

code:
<body onload="location.replace('http://www.altavista.com')">



mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-21-2001 09:20

<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.max.co.yu/">

The number 0 specifies how many seconds to wait before forwarding.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-21-2001 14:56

Use the META tag where possible, it's better for redirections.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-21-2001 18:13

Actually, the best way would be to do that directly in HTTP header that's sent back to web browser. Using PHP, for example:

<?php
header("Refresh: 0; URL=blah.php\n\n");
echo " "; // We must output something or Shitscape 4 will complain...
exit();
?>

silence
Maniac (V) Inmate

From: soon to be "the land down under"
Insane since: Jan 2001

posted posted 06-21-2001 19:56

Is there any way to disable any of these redirections or at least prompt before redirecting?

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-21-2001 20:03
  1. If redirection is done directly in HTTP header (which you can't see), you can't stop it (web browsers must react to all commands in HTTP header).
  2. If redirection is done using <META> tag, you can stop it if you quickly press STOP button in your web browser (but, in some browsers this doesn't work).
  3. If redirection is done using JavaScript, you can stop it if you completely disable JS.



lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-22-2001 15:49

Max: why didn't use PHP to redirect as:

code:
<?
Header("Location: [url=http://www.max.co.yu");]http://www.max.co.yu");[/url]
Exit();
?>




mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-22-2001 18:46

I had a lot of problems using code like that together with PHP4 sessions...

kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 06-22-2001 20:01

wow, thanks guys, that surely helped!
BTW, php is server sided, right?
k10


only change remains

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-22-2001 20:13

yep.

NoJive
Maniac (V) Inmate

From: The Land of one Headlight on.
Insane since: May 2001

posted posted 06-23-2001 16:40

So would something like all the above work with what i think is called 'Domain Parking?'

I'll explain as best I can.

a friend has just registered two .ca 's .... One site will be up and running long before the 2nd... so if somebody arrives at the 2nd... "still under construction" will the something like the above *forward* the user to the first site?

thanx

nj

« BackwardsOnwards »

Show Forum Drop Down Menu