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";
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";