Redirect Homepage override – urgent

Home Page Forums Network Management ZeroShell Redirect Homepage override – urgent

This topic contains 8 replies, has 0 voices, and was last updated by  webwarrior 12 years, 1 month ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #40675

    webwarrior
    Member

    Hi,

    We are providing free internet, and use a generic login account for every one.

    We need to get the people redirected to the community website, where sponsors are being advertised.

    How can we override the redirect to the person’s home page or initial requested page.

    #45540

    webwarrior
    Member

    The custom html login screen cannot be edited accept for the headers that it allows you.

    All the funtionality for the redirect stuff is in a compiled programm called:
    /usr/local/apache2/cgi-bin/zscp.

    this dynamically creates the web page on the fly, and handles the redirect to the original web page.

    We are stuffed, unless we can rewrite, and recompile this program.

    It generates code like this, which cannot be edited in any file:

    /*
    //commented out to stop any redirect in the forum//
    function RedirectSite() {
    var WO=window.opener
    if (WO!=null) {
    WO.location=”http://www.google.co.nz/”;
    }
    }
    function loaded() {
    NoDisconnectionWarning=false;
    window.onbeforeunload = DontCloseW;
    ReNew();
    setNormalRenew();
    setTimeout(“doNotCloseMsg()”,5000);
    RedirectSite();
    }

    */

    This hard coding of the redirect happens on the fy by this program.

    Anybody got a C-compiler??

    #45541

    webwarrior
    Member

    seems that the following file gets compiled on the fly at boot time, getting values from the database:

    /usr/local/apache2/cgi-bin/zscp

    Any ideas?

    #45542

    imported_fulvio
    Participant

    The binary you mentioned it is not compiled on the fly, but it is static. To produce dynamic pages, this binary uses the template files you can find in the directory /root/kerbynet.cgi/template
    To change the web login page you should modify the templates.

    Regards
    Fulvio

    #45543

    yuda
    Member

    You edit “/root/kerbynet.cgi/template/cp_redirect” file

    #45544

    webwarrior
    Member

    Hi,

    It s better to edit the cp_clientctrl page’s redirect function, otherwise you stuff up the redirect to your login page.

    #45545

    nrandom
    Member

    I am having this exact problem. The script has WO=””;

    So, when replacing does the format look like this:

    WO=http://xxxxxxxxx;

    or do you insert between brackets?

    any help would be greatly appreciated.

    #45546

    webwarrior
    Member

    Hi,

    Have a look at mine:

    http://www.freeinternet.co.nz/cp_cleintctrl.txt

    or change the following:

    function RedirectSite() {
    var WO=window.opener
    if (WO!=null) {
    WO.location=”http://www.streetnet.co.nz/gateway.php”;
    }
    }

    #45547

    nrandom
    Member

    thank you webwarrior for your help. I will try this tomorrow at school.

    BTW, the link gives me 404 error message.

    #45548

    nrandom
    Member

    I am still having problems with page redirect. When I open the browser to ip address http://10.xxx.xxx.xxx I get the captive portal logon page.
    I then put in the user name and password. It passes authentication and then goes to an error message page saying server not found.

    We have an internet proxy running. I suspect this maybe my problem but really don’t know.

    Can anyone help with some suggestions.

    noemi

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.