Hi Have you looked at the Virtuoso URL rewrite rules as detailed at:
http://docs.openlinksw.com/virtuoso/rdfiridereferencing.html#urlrewriting
http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtLinkedDataDeployment#URL%20Rewriting
Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc. // http://www.openlinksw.com/
Weblog -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter -- http://twitter.com/OpenLink
Google+ -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers
On 16 Sep 2013, at 18:02, Julien Cojan <[email protected]> wrote:
> Hello there,
>
> I have set up a Virtuoso server with DBpedia data and URI dereferencing
> (dbpedia VAD).
> I have introduced alternative URIs for DBpedia resources like for dbpedialite.
> The new URIs have a different namespace and they are related to DBpedia
> entries by owl:sameAs relations.
>
> For instance
> <http://fr.dbpedia.org/resourceById/1544866> owl:sameAs
> <http://fr.dbpedia.org/resource/Charles_Darwin>
>
> I would like to make the new URIs dereferencable with a simple http 302
> redirect towards the corresponding DBpedia resource.
>
> Is there a simlpe way to take into account RDF data to define http redirects
> in Virtuoso.
> I tried to define a vsp page to which I will redirect the virtual directory
> '/resourceById' :
> <?vsp
> declare _resource_, _resource_uri_, meta, data any;
>
> _resource_ := get_keyword ('res', params, '');
> _resource_uri_ := registry_get('dbp_domain') || _resource_;
>
> exec (sprintf ('sparql '||
> 'select ?o where { <%S> owl:sameAs ?o }', _resource_uri_), null, null,
> vector (), 0, meta, data);
> if (length (data))
> {
> http_request_status ('HTTP/1.1 302 Found');
> http_header ('Location: '|| data[0][0] ||'\r\nAccept:
> application/rdf+xml, text/html\r\n');
> }
> else{
> http_request_status ('HTTP/1.1 404 Not found');
> }
> ?>
>
> But I get stuck with content negotiation, "Content-Type: text/html;
> charset=UTF-8" is added to the header and thus I get a http 406 error when I
> ask for another content type like "application/rdf+xml".
> Is there be a nicer way to do this ?
>
> Thanks for any help,
> Julien
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk_______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________ Virtuoso-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/virtuoso-users
