andrew has asked for the wisdom of the Perl Monks concerning the following question:

I have a ?, how do some sites have something like this.

http://www.pickle.com/pop/red/index.htm?search=aa&bah=ss

... ?? its a .htm how can it read a qurey now. The reason why Im meationing this is because I have my site doing this I have a folders that my admin panel makes up for shopping, so say I have, http://www.store.com/Books/Good/, now when it reads of that direcotry it reads of a .shtml file which will goto my one cgi script. But would that page get added to a search engine cause thats my worry. Like would this page get added. http://www.store.com/Books/Good/?limit=10&offset=5

-Andrew

Replies are listed 'Best First'.
(jeffa) Re: index.htm and .cgi
by jeffa (Bishop) on Oct 06, 2002 at 00:52 UTC
    You can do this with the Apache web server with the AddHandler directive:
    <Directory /path/to/web_files> Options ExecCGI AddHandler cgi-script .htm </Directory>
    Personally, i don't like that. HTML files should not be CGI files in my humble opinion. What i do like is to use this trick with Excel (.xls) files and images (.jpg .png etc).

    As for your second question, well, i must admit that i really don't understand what you mean. A search engine will add a page to it's repository, but most likely not with arguments. Why is this a worry to you, by the way?

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

      While likely unrelated to this specific problem Lotus Domino (now IBM) does much of it's work using urls like http://www.domain.com/foo/bar.nsf/01234567890123456789012345678901/abcdefabcdefabcdefabcdefabcdefas?OpenDocument. Now this URL is pretty simple - the command is just OpenDocument. It's also quite common to get urls like ?OpenFrameset&Src=foo&Target=bar, ?OpenAgent¶m..... etc.

      This is poor planning on Lotus' part but doesn't change the fact that people do need search engines to index the information after the ? mark. Heck - the UseMod wiki does this as well. Everything to the right is the page being viewed/edited. You can't google a UseMod site unless you use the ? data as well. It's just not a good heuristic anymore. Like anything on the internet - those good old days are gone. Now Lotus does have workaround where you can get it to use the '!' bang mark but I recall there are some caveats to that. I've never needed it for my work and can't speak to it.

      __SIG__
      printf "You are here %08x\n", unpack "L!", unpack "P4", pack "L!", B::svref_2object(sub{})->OUTSIDE

      Hmm you wanna know what ill just make .shtml files search engine will crawl through that, it just a worry cause it doesnt search for after the "?"
Re: index.htm and .cgi
by joe++ (Friar) on Oct 06, 2002 at 07:53 UTC
    Apart from server sided logic (CGI) this could also mean that parameters are passed to client side scripts only. In JavaScript you can easily grab the string after the '?' with
    var params = document.location.search; // parse the params and take proper action
    This way you have the "poor man's CGI" without server side scripts etc., something which can be very useful if you don't have CGI rights (e.g. simple hosting provider).

    --
    Cheers, Joe