Hi all, To make my data linked data, I employ automatically generated redirects from a virtual space of URIs to SPARQL DESCRIBE queries through GET. For instance:
http://www.rdfabout.com/rdf/usgov/geo/us ...redirects to... http://www.rdfabout.com/sparql? query=DESCRIBE+%3Chttp://www.rdfabout.com/rdf/usgov/geo/us%3E This was accomplished with (sorry for broken line) this in an Apache .htaccess file: RedirectMatch 303 (/rdf/.*) http://rdfabout.com/sparql? query=DESCRIBE+%3Chttp://www.rdfabout.com$1%3E It maps only URLs within the 'http://(host)/rdf/' path space. I ran into a problem when I created some URIs with %20's in them, because the redirect would need to double-escape the %20's when they are put into the query string. After some chin-scratching I found out that mod_rewrite could be used to do a proper redirect, and I've documented it here: http://rdfabout.com/demo/census/htaccess.txt There's more explanation in the link, but the short story is putting into the main httpd.conf: RewriteMap esc int:escape and then into .htaccess: RewriteEngine on RewriteBase "/" RewriteRule ^(rdf/.*) http://%{HTTP_HOST}/sparql? (..all one line..) query=DESCRIBE+<http://%{HTTP_HOST}/${esc:$1}> [R] Thought others may find that useful. -- - Josh Tauberer http://razor.occams.info "Yields falsehood when preceded by its quotation! Yields falsehood when preceded by its quotation!" Achilles to Tortoise (in "Gödel, Escher, Bach" by Douglas Hofstadter) _______________________________________________ Linking-open-data mailing list [email protected] http://simile.mit.edu/mailman/listinfo/linking-open-data
