fusepoolP3/p3-vocab/master/.htaccess - Htaccess File

fusepoolP3/p3-vocab/master/.htaccess

RewriteEngine On
RewriteBase /

# Requests to the root
RewriteRule ^$ http://p3.fusepool.eu [R=301,L]

AddDefaultCharset utf-8
AddType text/turtle .ttl

# Rules based on http://www.wikier.org/blog/easily-document-your-vocabularies-ontologies-with-parrot

# Rewrite rule to serve HTML content from the vocabulary URI if requested 
RewriteCond %{HTTP_ACCEPT} !text/turtle.*(text/html|application/xhtml+xml) 
RewriteCond %{HTTP_ACCEPT} text/html [OR] 
RewriteCond %{HTTP_ACCEPT} application/xhtml+xml [OR] 
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* 
RewriteCond %{REQUEST_FILENAME}.ttl -f
RewriteRule ^([a-z0-9]+)$ http://idi.fundacionctic.org/parrot/parrot?documentUri=http://vocab.fusepool.info/$1.ttl&&customizeCssUrl=http://vocab.fusepool.info/style.css [R=303,L]

# Rewrite rule to serve RDF content from the vocabulary URI if requested 
RewriteCond %{HTTP_ACCEPT} text/turtle
RewriteCond %{REQUEST_FILENAME}.ttl -f
RewriteRule ^([a-z0-9]+)$ $1.ttl [R=303,L] 
  
# Rewrite rule to serve the RDF content from the vocabulary URI by default 
RewriteCond %{REQUEST_FILENAME}.ttl -f
RewriteRule ^([a-z0-9]+)$ $1.ttl [R=303]

# Deprecated namespaces
RewriteRule ^ldp$ elpd [R=301,L]

On Github License

Files

Download PDF of Htaccess file
HTTP_ACCEPT, HTTP_USER_AGENT, REQUEST_FILENAME

Comments

Apache