Options -MultiViews AddType application/rdf+xml .rdf AddType text/turtle .ttl RewriteEngine On RewriteBase / ## No rewriting for files that physically exist ## (a shortcut to avoid checking all subsequent patterns) RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^.*$ - [PT,L] ## Legacy files # "introduction" pages have been renamed to index RewriteRule ^(.*)/introduction(.html)?$ $1/index.html [R=301,L] # "ldpath.html" was duplicate content (has been moved to ldpath/* RewriteRule ^ldpath\.html$ ldpath/ [R=301,L] ## Redirect links generated by maven (e.g. in the dependencies report) to the ## best matching info-page: # KiWi RewriteRule ^kiwi-parent$ kiwi/ [R=303,L] RewriteRule ^(kiwi(-parent)?/)?kiwi-([^-/]+)(\.html)?$ kiwi/$3.html [R=303,L] RewriteRule ^(kiwi(-parent)?/)?kiwi-([^/]+)(\.html)?$ kiwi/ [R=303,L] # LDCache RewriteRule ^ldcache-backend-([^-/]+)$ ldcache/backends.html [R=303,L] RewriteRule ^ldcache-sail-([^-/]+)$ ldcache/wrappers.html [R=303,L] RewriteRule ^ldcache-([^/]+)$ ldcache/ [R=303,L] # LDClient RewriteRule ^ldclient-provider-([^-/]+)$ ldclient/modules.html [R=303,L] RewriteRule ^ldclient-([^/]+)$ ldclient/ [R=303,L] # LDPath RewriteRule ^ldpath-backend-([^-/]+)$ ldpath/backends.html [R=303,L] RewriteRule ^ldpath-functions-([^-/]+)$ ldpath/functions.html [R=303,L] RewriteRule ^ldpath-template(-([^-/]+))?$ ldpath/template.html [R=303,L] RewriteRule ^ldpath-([^/]+)$ ldpath/ [R=303,L] # Platform RewriteRule ^marmotta-commons$ commons.html [R=303,L] RewriteRule ^marmotta-(installer|webapp)$ installation.html [R=303,L] RewriteRule ^marmotta-client-([^/]+)$ client-library.html [R=303,L] RewriteRule ^marmotta-([^-/]+)(\.html)?$ platform/$1-module.html [R=303,L] RewriteRule ^marmotta-([^/]+)$ platform/ [R=303,L] # Sesame-Tools RewriteRule ^sesame-([^/]+)$ sesame.html [R=303,L] # Misc RewriteRule [^/]+-reactor$ / [R=303,L] RewriteRule [^-/]+-maven-plugin$ / [R=303,L] ## If we get here, check for a missing .html extension - manual multiviews with 303 redirect. ## TODO: add "real" content negotiation here? e.g for .rdf, .ttl, etc... RewriteCond %{REQUEST_FILENAME} !\.(html|js|css|png|gif|ico)$ RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$ $1.html [R=303,L]