Perl script to redirect web page
Perl script to redirect web page
Sometimes there will be a requirement for our website to redirect users when required. For example for a perl application, once authenticated if the user belongs to a specific group then that user can be redirected to the concerned dashboard using this perl functionality. Here is the code.
#!"C:\perl\bin\perl.exe" #Any location for example http://mistonline.in/wp/get-ipaddress-using-perl-script/ or something similar my $my_location = '<YOUR-LOCATION>'; print "Location: $my_location\n\n";
Here all you need to modify is the PERL HEADER [According to Linux, UNIX, AIX or Windows Perl installed path] and also $my_location to your own webpage.