#!/usr/bin/perl -T # eLUCIdator - Redirect script # POD at the bottom. Run this file through pod2html or # view the documentation under docs. use strict; use CGI; use Config::General; use vars qw($path $sep); BEGIN { # see changelog $0=~s/^(.*)(\/|\\)// and $path=$1 or $path='.'; $sep = $2 || '/'; } use constant LUCI_CONF => $path.$sep.'luci.conf.cgi'; # load up the config vars my $conf = new Config::General(-ConfigFile => LUCI_CONF, -SplitPolicy => "equalsign", -AutoLaunder => 1, -InterPolateVars => 1); my $config = {$conf->getall}; # redirect to luci with the appropriate referrer print CGI::redirect($config->{app_url} . (exists($ENV{HTTP_REFERER})?"/".$ENV{HTTP_REFERER}:"")); =head1 NAME Redirect - eLUCIdator redirect script =head1 PURPOSE You can put a text only link on pages in your site, point the link at this script, and it will take care of directing the appropriate page through Luci. Pointing your pages at this script makes it much easier to add text only links to all your pages using a simple href tag. =head1 USAGE See L for more information, and for some icons available for use with this script. =head1 LUCI DOCUMENTATION See L for more information. =head1 AUTHORS =over =item * Shawn McGinn =begin html shawnmcginn@users.sourceforge.net

=end html =item * Kyle Boyle =begin html kagey@users.sourceforge.net =end html =back =cut