[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Server Side Includes



> So what does one do?
>
> Alan Fry
> ajf@afco.demon.co.uk

You have two options as I see it:

#1. Wait for WebStar 1.3 which will support SSI.
#2. Dynamically create the web pages.

How to do #2:

Define an action in WebStar which says something like:

If a file that ends in .html is requested, execute XXX CGI instead.

Then, WebStar passes the HTTP_HEADER values to the CGI as AE's. Included
in this is the relative path to the file. Then just have your CGI open
the file, parse out whatever you want in order to add the counter.
Then have the CGI return the contents of the file to WebStar.

Really, this is not as hard to do as it sounds. NetCloak ( http://
www.maxum.com/ ) is the best example of doing this. I also suggest that
if you are only working with MacPerl and will not be porting your CGI's
to unix, that you look into Frontier. It is currently the "Perl" for
Mac Webservers. It has a framework that makes adding a counter to a
page only one line of code.

(I'm not putting down perl for the macos, i'm only saying that for
webstar CGI's, IMHO it is not the right tool for the right job.)

You can get all the info you need from : http://www.clearink.com/fun_
stuff/frontier/

hope that helps,

-jon stevens

Jon S. Stevens         yanni@clearink.com
ClearInk WebMagus      http://www.clearink.com/
finger pgp@sparc.clearink.com for pgp pub key
What gets us into trouble is not what we don't know.
It's what we know for sure that just ain't so.
 - Yogi Berra