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

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 domain.com/, it redirects you to
domain.com/cgi-bin/script.cgi.

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 domain.com. 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.
sleepybearAsked:
Who is Participating?
 
ahoffmannCommented:
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
0
 
TintinCommented:
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 domain.com/index.cgi as your home page.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.