in reply to SSI or .HTACCESS for CGI

You don't say what web server this is under, but I'm going to guess Apache from the .htaccess reference. If so, then you can create a single .htaccess file under /shop/ and have it set the default index page for all directories under and including /shop/ to use your CGI, like so...

DirectoryIndex /shop/category.cgi

Then you can peek in $ENV{'REQUEST_URI'} to determine what category was requested.

    --k.


Replies are listed 'Best First'.
Re^2: SSI or .HTACCESS for CGI
by tadman (Prior) on Nov 10, 2002 at 23:13 UTC
    Since you're using CGI, you probably should make use of the methods that it provides for this sort of thing instead of using the environment variables. It's not going to make much of a difference under Apache, but if you ever try to port this to another Web server platform, you'll be glad you did this:
    my $path = $cgi->path_info();
    This should return any parameters received after the CGI program itself. Give it a bit of testing to see how to map this back in to your cart namespace.