PDA

View Full Version : Redirecting Browsers


llbbl
12-29-2004, 08:53 PM
There are several ways to do it. I will try and summarize the different ways.

PHP

<?php
header("Location: http://www.llbbl.com/blog/");
?>


HTML

In the HTML header:

<meta http-equiv="refresh" content="0;URL=http://www.llbbl.com/blog/">


Javascript

In the HTML header:

<script language="Javascript" type="text/javascript">
<!-- Hide script
//<![CDATA[
window.location.href="http://www.llbbl.com/blog/"
//]]> End script hiding -->
</script>


Apache

You have to edit your httpd.conf file to add a line similar to the following.

Redirect /adirectory http://www.llbbl.com/blog/

Perl

#/usr/bin/perl -w
use strict;
use CGI qw/:standard/;
print redirect('http://www.llbbl.com/blog/');

Or without the CGI module

#/usr/bin/perl -w
use strict;
print 'Status: 302 Moved', "\r\n", 'Location: http://www.llbbl.com/blog/', "\r\n\r\n";

ECA
12-30-2004, 04:51 AM
Why would you want a Nub, to know how to redir.

there are those out there that dont know how to REDIR, and want to, and you post the info so they CAN.
We see enough of these in the logs, loaded into the REG. DONT tell them how to do that also, plz.

its ok, when used properly. But alot of these Bot and spam sites use it also. With a REF# they get lots of points/cash.

did someone ask for this??

llbbl
12-30-2004, 10:45 AM
ECA if they really wanted to know how to do it this post isn't stopping them from learning how. The information is readily available and I think that there is no reason that we shouldn't post it. This is NOT the same as setting up a web site and promoting it using REF#. It requires totally different code. This is a simple tutorial...

ECA
12-30-2004, 12:32 PM
but cant you Redir to multiple sites, and have them all poping up??

llbbl
12-30-2004, 12:49 PM
No only one site at time, unless the site you send it to has a redirect. The code above is only for your current browser window. You are talking about spawning multiple windows. That is most often done with javascipt, but it can also be done with other languages. I can show you how to do that also if you want :)

ECA
12-30-2004, 01:25 PM
nope, this is bad enough...
Continue...