Hi..
I am working on a CGI script to enable client to obtain the server ip address and then change to the IP address it prefer.
The server IP address can be obtain from the environment variable SERVER_ADDR
I am trying to change the IP address of the server with the following script:
#!/usr/bin/perl -w
use strict;
my $URL="http://192.168.28.130" ;
print "Status: 302 Moved\nLocation : $URL\n\n";
system("/sbin/ifconfig eth0 192.168.28.130" );
I managed to change the IP address of the server. But the Re-driection of the web page doesnt not happen.
Any idea how to solve this???
I am working on a CGI script to enable client to obtain the server ip address and then change to the IP address it prefer.
The server IP address can be obtain from the environment variable SERVER_ADDR
I am trying to change the IP address of the server with the following script:
#!/usr/bin/perl -w
use strict;
my $URL="http://192.168.28.130" ;
print "Status: 302 Moved\nLocation : $URL\n\n";
system("/sbin/ifconfig eth0 192.168.28.130" );
I managed to change the IP address of the server. But the Re-driection of the web page doesnt not happen.
Any idea how to solve this???
Comment