Question about using cgi script as website's main/home/index page

Posted on 2006-04-22
Last Modified: 2013-12-25
When you reach the main (index) page of my website, it currently
redirects you to a CGI script.

So in other words, if you go to, it redirects you to

With PERL, Is there a better way to do that than a redirect? I know in
PHP, you can just call the file index.php and it will load when a person
requests Is there a CGI alternative to that?

Does index.shtml do the same thing? I was under the impression
that you have to *specifically* use .shtml in the URL for it to work.

I'm aware of some less-attractive alternatives - JS includes, AJAX,
frames, etc. - but  any ideas/suggestions are welcome.
Question by:sleepybear
    LVL 51

    Accepted Solution

    this is not a PHP or perl nor a CGI issue, but one of your web server configuration

    If you use index.shtml *and* it is a SSI file *and* your server supports SSI, then you can achive it without a reirect to the browser with the SSI directive "exec cmd=...."

    JS, AJAX Frames are all client-side technics somehow, so it wont help you
    LVL 48

    Assisted Solution

    As ahoffman says, it's not a PHP, Perl or CGI issue.

    Assuming you are running an Apache server, you can set:

    AddHandler cgi-script .cgi

    to make any file with a .cgi extention be processed as a CGI program.  Then you can have as your home page.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
    JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now