<as subject> Thanks!
Feb 12, 2002, 11:37 AM
Novice (22 posts)
Feb 12, 2002, 11:37 AM
Post #7 of 21
Views: 14126
Hi! I have edited the admin.pm successful. Yes, the admin_login.shtml is now found. However, it doesn't perform the SSI tag action.
(For example, I include the tag to echo the remote address, it doesn't display on the login page. ) <!--#echo var="REMOTE_ADDR" -->
Basically, I have a script to detect valid referer url. It will automatically redirect it to my front page if found invalid. <!--#exec cgi="/cgi-bin/thebouncer.cgi"-->
I try to call this script inside the admin_login.shtml, however, 'nothing' happens. Please advice. Thank you!
(For example, I include the tag to echo the remote address, it doesn't display on the login page. ) <!--#echo var="REMOTE_ADDR" -->
Basically, I have a script to detect valid referer url. It will automatically redirect it to my front page if found invalid. <!--#exec cgi="/cgi-bin/thebouncer.cgi"-->
I try to call this script inside the admin_login.shtml, however, 'nothing' happens. Please advice. Thank you!
Feb 13, 2002, 9:17 PM
Novice (22 posts)
Feb 13, 2002, 9:17 PM
Post #8 of 21
Views: 14142
Hi! Would one of your stuff give me more help.
I bought this script last week, and I still can't really start using it yet.
I was told that I can call another script within fileman script before I made my purchase.
However, I still can't get it to work. Please kindly help and reply to my problem. Thanks in advance.
I bought this script last week, and I still can't really start using it yet.
I was told that I can call another script within fileman script before I made my purchase.
However, I still can't get it to work. Please kindly help and reply to my problem. Thanks in advance.
Feb 14, 2002, 11:49 AM
Staff / Moderator (733 posts)
Feb 14, 2002, 11:49 AM
Post #9 of 21
Views: 14103
Feb 16, 2002, 3:40 PM
Staff / Moderator (132 posts)
Feb 16, 2002, 3:40 PM
Post #13 of 21
Views: 14088
Feb 20, 2002, 12:46 AM
Novice (22 posts)
Feb 20, 2002, 12:46 AM
Post #17 of 21
Views: 14133
Is this the log you mentioned?
*************************************************
Bareword "cgi" not allowed while "strict subs" in use at fileman.cgi line 31.
Execution of fileman.cgi aborted due to compilation errors.
[Wed Feb 20 05:48:31 2002] [error] [client ip.ip.ip.ip] Premature end of script headers: /home/virtual/site6/fst/var/www/cgi-bin/fileman/fileman.cgi
****************************************************
Thank you for your help.
*************************************************
Bareword "cgi" not allowed while "strict subs" in use at fileman.cgi line 31.
Execution of fileman.cgi aborted due to compilation errors.
[Wed Feb 20 05:48:31 2002] [error] [client ip.ip.ip.ip] Premature end of script headers: /home/virtual/site6/fst/var/www/cgi-bin/fileman/fileman.cgi
****************************************************
Thank you for your help.
Feb 20, 2002, 1:14 AM
Staff / Moderator (132 posts)
Feb 20, 2002, 1:14 AM
Post #18 of 21
Views: 14096
Feb 20, 2002, 1:51 AM
Novice (22 posts)
Feb 20, 2002, 1:51 AM
Post #19 of 21
Views: 14082
Yes, the 500 internal error does not appear anymore.
However, it is not able to detect invalid referrer either.
I wonder if it's because the script for the fileman runs prior thebouncer.cgi.
That's why it think that's is valid referrer ALL the time.
What do you think?
However, it is not able to detect invalid referrer either.
I wonder if it's because the script for the fileman runs prior thebouncer.cgi.
That's why it think that's is valid referrer ALL the time.
What do you think?
Feb 20, 2002, 9:56 AM
Staff / Moderator (132 posts)
Feb 20, 2002, 9:56 AM
Post #20 of 21
Views: 14117
If you need to check valid referers only , just simply add the code below to the top of subroutine main in your fileman.cgi:
my $redirect = 'http://www.your_redirect.com';
my $found_flag;
foreach (@referers) { $ENV{'HTTP_REFERER'} =~ /\Q$_\E/i and $found_flag++ and last; }
$found_flag or return print GT::CGI->redirect($redirect);
.....Hope that helps,
jean(at)Gossamer-Threads.com
Code:
my @referers = qw|www.yoursite1.com www.yoursite2.com|; my $redirect = 'http://www.your_redirect.com';
my $found_flag;
foreach (@referers) { $ENV{'HTTP_REFERER'} =~ /\Q$_\E/i and $found_flag++ and last; }
$found_flag or return print GT::CGI->redirect($redirect);
.....
jean(at)Gossamer-Threads.com