ufal / clarin-dspace

clarin-dspace digital repository based on DSpace and LINDAT/CLARIN DSpace
http://lindat.cz
BSD 3-Clause "New" or "Revised" License
27 stars 18 forks source link

Web server rewrites/redirects modification for Apache 2.4.x #543

Closed alessandroenea closed 8 years ago

alessandroenea commented 8 years ago

In the official document: https://github.com/ufal/lindat-dspace/wiki/Repository-Checklist the block: "For accept header cmdi and query string format=cmdi. In apache it's as follows:" contains this two lines:

RewriteCond %{QUERY_STRING} format=cmdi [NC]
RewriteRule ^(.*)/xmlui/handle/(.*)$ https://%{HTTP_HOST}$1/oai/cite?metadataPrefix=cmdi&handle=$2 [L,R=301]

which don't work with our Apache 2.4.7.

We changed them as follows:

RewriteCond %{QUERY_STRING} format=cmdi [NC]
RewriteCond %{REQUEST_URI} ^(.*)/xmlui/handle/(.*)$
RewriteRule ^(.*)/xmlui/handle/(.*)$ https://%{HTTP_HOST}$1/oai/cite?metadataPrefix=cmdi&handle=$2 [R,L]
kosarko commented 8 years ago

I've put a link back to this issue from the wiki in case someone else has similar issue.

However, I've tested it with Server version: Apache/2.4.18 (Ubuntu) and it seemed ok.