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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.