diff options
author | David Robillard <d@drobilla.net> | 2011-11-14 04:26:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-11-14 04:26:15 +0000 |
commit | 1d75440f9719b9f2de57f6250f574b427939ea50 (patch) | |
tree | 4fe7666cb3008064fd700b05a195dbdbfa053b89 /doc/htaccess.in | |
parent | db32487a23a07dcf62686480aa8642c4795f3787 (diff) | |
download | lv2-1d75440f9719b9f2de57f6250f574b427939ea50.tar.xz |
Use htaccess for conneg instead of PHP.
Diffstat (limited to 'doc/htaccess.in')
-rw-r--r-- | doc/htaccess.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/htaccess.in b/doc/htaccess.in new file mode 100644 index 0000000..43c3002 --- /dev/null +++ b/doc/htaccess.in @@ -0,0 +1,24 @@ +# Turn off MultiViews +Options -MultiViews + +# Ensure *.ttl files are served as appropriate content type +AddType text/turtle .ttl + +# Rewrite engine setup +RewriteEngine On +RewriteBase @BASE@ + +# Rewrite rule to serve HTML content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} !application/rdf\+xml.*(text/html|application/xhtml\+xml) +RewriteCond %{HTTP_ACCEPT} text/html [OR] +RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml [OR] +RewriteCond %{HTTP_USER_AGENT} ^Mozilla/.* +RewriteRule ^$ @NAME@.html [L] + +# Rewrite rule to serve Turtle content from the vocabulary URI if requested +RewriteCond %{HTTP_ACCEPT} text/turtle [OR] +RewriteCond %{HTTP_ACCEPT} application/x-turtle +RewriteRule ^$ @NAME@.ttl [L] + +# Serve HTML page by default +RewriteRule ^$ @NAME@.html [L] |