Skip to content

how to: redirection and content negotiation

Diego Valerio Camarda edited this page Dec 13, 2015 · 2 revisions

use case 1

conf.ttl

 conf:IRInamespace <http://data.example.com/resource/>  ;  
 conf:endpoint <http://data.example.com/sparql>;  
 conf:httpRedirectSuffix ".html";  
 conf:httpRedirectPrefix "";  
 conf:publicUrlPrefix <auto>;
 conf:staticResourceURL <auto>

httpd.conf

ProxyPass /resource http://localhost:8080/lodview
ProxyPassReverse /resource http://localhost:8080/lodview

use case 2

conf.ttl

 conf:IRInamespace <http://data.example.com/resource/>  ;  
 conf:endpoint <http://data.example.com/sparql>;  
 conf:httpRedirectSuffix "";  
 conf:httpRedirectPrefix "";  
 conf:publicUrlPrefix <auto>;
 conf:staticResourceURL <auto>

httpd.conf

ProxyPass /resource http://localhost:8080/lodview
ProxyPassReverse /resource http://localhost:8080/lodview

use case 3 (current dbpedia configuration)

conf.ttl

 conf:IRInamespace <http://dbpedia.org/>  ; 
 conf:endpoint <http://dbpedia.org/sparql>; 
 conf:httpRedirectSuffix "";  
 conf:httpRedirectPrefix "/page/"  
 conf:httpRedirectExcludeList ".+/property/.+,.+/ontology/.+";   
 conf:redirectionStrategy "pubby"; 
 conf:publicUrlPrefix <http://dbpedia.org/>;
 conf:forceIriEncoding "auto";
 conf:staticResourceURL <auto>

httpd.conf

    ProxyPass	/page   http://localhost:8180/lodview/page
    ProxyPass	/resource	http://localhost:8180/lodview/resource
    ProxyPass	/data   http://localhost:8180/lodview/data
    ProxyPass	/property	http://localhost:8180/lodview/property

    ProxyPassReverse        /page   http://localhost:8180/lodview/page
    ProxyPassReverse        /resource	http://localhost:8180/lodview/resource
    ProxyPassReverse        /data   http://localhost:8180/lodview/data
    ProxyPassReverse        /property	http://localhost:8180/lodview/property

    ProxyPass	/lodview/staticResources http://localhost:8180/lodview/staticResources
    ProxyPass	/linkedResourceTitles        http://localhost:8180/lodview/linkedResourceTitles
    ProxyPass	/linkedResourceInverses        http://localhost:8180/lodview/linkedResourceInverses
    ProxyPass	/linkedResource       http://localhost:8180/lodview/linkedResource