tigra
Administrator
Posts: 1982
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 12/16/2005 at 05:37 AM |
|
|
generate HTML site map from menu_items.js or tree_items.js (CGI/Perl)
attached is simple script that generates the static HTML site map from the menu/tree config file. This will expose menu links to search engine
crawlers.
Known issues: fpr the implementation simplicity the script doesn't understand multiline comments (/*...*/) in javascript file.
Attachment: map.pl (1.75kb)
This file has been downloaded 609 times
|
|
|
quietfart
Junior Member
Posts: 4
Registered: 9/13/2004
Member Is Offline
|
| posted on 8/28/2006 at 08:51 PM |
|
|
How do I use map.pl?
Hi tigra,
Do you have some documentation on how to utilize this map.pl file? So far I've just put it in the same directory as my tree_items.js and I don't
know how to proceed to generate the html site map. Thanks!
|
|
|
tigra
Administrator
Posts: 1982
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 8/29/2006 at 12:22 AM |
|
|
it should be in the scripts directory (usually cgi-bin), with the right permissions set (usually 755), first line should point to the interperter
(usually /usr/bin/perl) and $ITEMS_FILE should be set to correct items file path. Then if you request map.pl via the http request it will respond with
the HTML code containing links (just like the regular HTML page, but generated dynamically by the script).
|
|
|
quietfart
Junior Member
Posts: 4
Registered: 9/13/2004
Member Is Offline
|
| posted on 9/4/2006 at 04:05 PM |
|
|
Hi tigra,
I have placed map.pl into the cgi directory. I have changed the first two lines to look like this, with no other changes to the map.pl file:
------------
#!/home/content/s/u/t/sutrapearls/html/cgi/
my $ITEMS_FILE = '/home/content/s/u/t/sutrapearls/html/tree/tree_items.js';
------------
My host, GoDaddy.com, provided me with these paths a while ago.
I then used an FTP program to change the permission to 755.
I then try to access the file at http://sutrapearls.org/cgi/map.pl, and I get a
500 Internal Server Error.
Did I do something wrong?
Thanks!
|
|
|
tigra
Administrator
Posts: 1982
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 9/5/2006 at 11:49 AM |
|
|
check out the server's error log for more information.
|
|
|