?
Solved

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

Posted on 2006-04-22
2
Medium Priority
?
275 Views
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 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.
0
Comment
Question by:sleepybear
2 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 600 total points
ID: 16520425
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
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 150 total points
ID: 16521248
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month14 days, 23 hours left to enroll

839 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