How do auto run a script ...

Discussion in 'Linux VPS/Dedicated - General' started by transcriptionist.com.au, Jun 23, 2006.

  1. transcriptionist.com.au

    transcriptionist.com.au 3x WHM VPS + Growing

    Hello

    I have a sub-domain, secure.mydomain.com and under this I have a script in the cgi-bin called login.pl

    To run this script in my browser I currently go https://secure.mydomain.com/cgi-bin/login.pl
    I have the SSL cert installed already.

    I want to just go secure.mydomain.com in my browser and have it automatically:

    1. Redirect to https
    2. Run the script in cgi-bin without me having to fully qualify the path to the script

    Anyone know how I can set this.

    Thanks

    Dave
    Sydney, Australia
     
  2. KH-Paul

    KH-Paul CTO Staff Member

    Depending on the server configuration you may try to either:

    - use .htaccess to redirect requests:
    RedirectMatch permanent ^/$ https://secure.mydomain.com/cgi-bin/login.pl

    - create index.html file in the secure.mydomain.com domain's home directory:

    <html>
    <head>
    <meta content="0; url="https://secure.mydomain.com/cgi-bin/login.pl" http-equiv="refresh">
    </head>
    </html
     

Share This Page