home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Need fast help!

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2639
Discussions: 200,966, Posts: 2,379,630, Members: 246,332
Old June 3rd, 2002, 11:45 AM   Digg it!   #1 (permalink)
Ultimate Member
 
e980238's Avatar
 
Join Date: Jan 2002
Posts: 1,881
Need fast help!

I was wondering of someone could help me write a cgi script that when some one goes to this website, http://ejk.myip.org:88/cgi-bin/ikonboard.cgi
it will automatically re direct them to here:
http://ejk.myip.org:88/phpBB2/index.php
__________________
Got root?
e980238 is offline   Reply With Quote
Old June 3rd, 2002, 12:16 PM     #2 (permalink)
OH NO!
 
Brainchild's Avatar
 
Join Date: Oct 2001
Location: Monett Missouri
Posts: 4,300
Send a message via Yahoo to Brainchild
How about this or maybe This one and the Google
Hope that helps some,
__________________
The impossible takes more time,and costs more money.
Brainchild is offline   Reply With Quote
Old June 3rd, 2002, 12:36 PM     #3 (permalink)
Ultimate Member
 
e980238's Avatar
 
Join Date: Jan 2002
Posts: 1,881
ok i got a redirect script but i am still having trouble. this is the scrips:
#!/usr/bin/perl
################################################## ####################
# Redirect URL Version 1.0 #
# Copyright 1999 Frederic TYNDIUK (FTLS) All Rights Reserved. #
# E-Mail: tyndiuk@ftls.org Script License: GPL #
# Created 05/30/99 Last Modified 05/30/99 #
# Scripts Archive at: http://www.ftls.org/cgi/ #
################################################## ####################
# Function : #
# Redirect visitor to another URL #
# Use it : redirect.cgi?URL #
# URL = http://www.webdom.com/page/ #
################################################## ####################
##################### license & copyright header #####################
# #
# Copyright (c) 1999 TYNDIUK Frederic #
# #
# This program is free software; you can redistribute it and/or #
# modify it under the terms of the GNU General Public License as #
# published by the Free Software Foundation; either version 2 of #
# the License, or (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program in the file 'COPYING'; if not, write to #
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, #
# Boston, MA 02111-1307, USA, or contact the author: #
# #
# TYNDIUK Frederic <tyndiuk@ftls.org> #
# <http://www.ftls.org/> #
# #
################### end license & copyright header ###################
################################################## ####################
# Necessary Variables: #
# The following variables should be set to define the locations #
# and URLs of various files, as explained in the documentation. #

#Options:
$UseLog = 0; # Use Log File ? 1 = YES; 0 = NO
$LogFile = "/Absolute/path/to/log.txt";

# Nothing Below this line needs to be altered! #
################################################## ####################

@date = localtime(time); $date[4]++;
$Time = "$date[4]/$date[3]/$date[5]";

$Query_File = $ENV{QUERY_STRING};
$Query_File =~ s/%([0-9A-F][0-9A-F])/pack("C",oct("0x$1"))/ge;
$Query_File =~ tr/+/ /;
($url) = split(/\&/,$Query_File);

if ($url =~ /=/) {
($name, $url) = split(/=/, $url);
}

if ($UseLog) {
open(LOG,">>$LogFile") || &Error("Cannot Write Log File : $LogFile, Error $!\n");
print LOG "[$Time] - $ENV{'REMOTE_HOST'} -> $url\n";
close(LOG);
}

if ($url =~ /^(ht|f)tp:\/\//) {
print "Location: $url\n\n";
} else {
&Error("Your URL sould be begining by http:// or ftp://\n");
}

sub Error {
my($ErrorText) = @_;
print "Content-type: text/html\n\n";
print "Error: ".$ErrorText;
exit;
}




but where do i put in the url to redirect to??
e980238 is offline   Reply With Quote
Old June 3rd, 2002, 02:10 PM     #4 (permalink)
Ultimate Member
 
Praetorian's Avatar
 
Join Date: Oct 2001
Location: Arizona
Posts: 2,538
How about creating a .htaccess file?
Quote:
Redirect /ikonboard.cgi http://ejk.myip.org:88/phpBB2/index.php

Put that inside a file called .htaccess and upload it to the directory. Give it a shot then.
Praetorian is offline   Reply With Quote
Old June 3rd, 2002, 03:56 PM     #5 (permalink)
Ultimate Member
 
e980238's Avatar
 
Join Date: Jan 2002
Posts: 1,881
nah that didnt work
e980238 is offline   Reply With Quote
Old June 3rd, 2002, 04:02 PM     #6 (permalink)
Ultimate Member
 
Praetorian's Avatar
 
Join Date: Oct 2001
Location: Arizona
Posts: 2,538
And you're putting that inside the directory that has ikonboard.cgi?
Praetorian is offline   Reply With Quote
Old June 3rd, 2002, 04:10 PM     #7 (permalink)
Ultimate Member
 
e980238's Avatar
 
Join Date: Jan 2002
Posts: 1,881
yes
e980238 is offline   Reply With Quote
Old June 3rd, 2002, 04:36 PM     #8 (permalink)
Ultimate Member
 
e980238's Avatar
 
Join Date: Jan 2002
Posts: 1,881
is there any way that I can just edit the ikonboard.cgi file to display a message and a link to the new url?
e980238 is offline   Reply With Quote
Old June 3rd, 2002, 05:16 PM     #9 (permalink)
Ultimate Member
 
e980238's Avatar
 
Join Date: Jan 2002
Posts: 1,881
ok i got it This script seemed to work for me:
#!/usr/bin/perl

################################################## ########################################
#Redirect 1.01 -- December 14, 1996
#
#Written by Bernard Sowa <bernard@zonecoaster.com>
#
#$default
# Location to redirect user to if no URL is given
################################################## ########################################

$default='http://ejk.myip.org:88/phpBB2/index.php';

($other,$url) = split(/=/,$ENV{'QUERY_STRING'});

if($url =~ /\&x/)
{
$url =~ s/\&x//g;
}

if($url ne "")
{
$url =~ s/\+/ /g;
$url =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$url =~ s/~!/ ~!/g;
$url =~ s/\%2F/\//g;
}
else
{
$url=$default;
}
print "Location: $url\n\n";
exit 0;
e980238 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3007)
Forty-six years ago today (7)
Laptop with wireless problem. (12)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Internet Lost (5)
windows 7 problem (7)
windows vista security holes (15)
Point and Shoot Camera Suggestions. (6)
Is the PSU I received dead? (13)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
Recent Discussions
windows vista security holes (15)
Help getting around port 80 for camer.. (4)
Laptop with wireless problem. (12)
Open With ..... Win7 (2)
Internet Lost (5)
Skillsoft Network+ Study Software Que.. (9)
virus blocking exe. files (1)
Point and Shoot Camera Suggestions. (6)
CPU fan stops spinning randomly (11)
Nvidia GTX 260 problem (1)
Modern Warfare 2: Who Bought It? (65)
Is the PSU I received dead? (13)
Print spooler problem (16)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
webcam (0)
upgrade for hp a6101 (0)
tv not turn on-makes clicking sound (2)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
Ideal cheap graph card for PC-Gaming? (18)


All times are GMT -4. The time now is 02:10 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28