Hello you lovely, helpful forum users! Once again, I am stumped by a seemingly simple situation, and our IT team can't suss it out either.
Editors of our site upload mostly .pdf files to the uploads folder, and then generate links to these manually which are embedded within flowchart files to be displayed to the end user - i.e. as hyperlinks to follow to view the .pdf in a new window. The links we generate are, for example:
/couch/uploads/file/patents/ep/exam-report-received/reporting-oa-to-client.PDF
clicking the link takes them to
http://handbook/couch/uploads/file/patents/ep/exam-report-received/reporting-oa-to-client.PDF
as you can see, this example has a capitalised file extension. This seems to happen from time to time when users generate and upload their pdf files. Unfortunately, the links we create are a one-time thing, whereas the .pdf files get updated from time to time. In this example, were I to update the .pdf file, it would almost certainly be by uploading a pdf with a lowercase extension. Alternatively, other users will update my .pdf files with their .PDF files.
This has happened a few times now, and it breaks the hyperlinks because Apache is case sensitive in URLs. The seemingly simple solution to this was to enable the speling module (https://httpd.apache.org/docs/2.4/mod/mod_speling.html) with CheckCaseOnly On
apache2.conf has been set to Directory /var/www/ AllowOverride All
We did this, and if I introduce a capital letter to one of the webpages (i.e. not an upload, but is a templated blog page handled by Couch) it works - it rewrites the url to match the existing page. Unfortunately it does not do the same for the couch uploads.
I have deleted the .htaccess files in couch (that Deny all) because as soon as we implemented mod speling all of the files within /couch/uploads/ returned internal server errors. Deleting the .htaccess files within /couch/ has fixed that.
So I suppose I have 2 questions:
1) is there something I've missed that I need to do to enable the speling module to work for those files in /couch/uploads/ ?
2) does couch have a built in functionality that I've missed / can't find that would achieve this instead?
Thanks in advance!
Anthony
Editors of our site upload mostly .pdf files to the uploads folder, and then generate links to these manually which are embedded within flowchart files to be displayed to the end user - i.e. as hyperlinks to follow to view the .pdf in a new window. The links we generate are, for example:
/couch/uploads/file/patents/ep/exam-report-received/reporting-oa-to-client.PDF
clicking the link takes them to
http://handbook/couch/uploads/file/patents/ep/exam-report-received/reporting-oa-to-client.PDF
as you can see, this example has a capitalised file extension. This seems to happen from time to time when users generate and upload their pdf files. Unfortunately, the links we create are a one-time thing, whereas the .pdf files get updated from time to time. In this example, were I to update the .pdf file, it would almost certainly be by uploading a pdf with a lowercase extension. Alternatively, other users will update my .pdf files with their .PDF files.
This has happened a few times now, and it breaks the hyperlinks because Apache is case sensitive in URLs. The seemingly simple solution to this was to enable the speling module (https://httpd.apache.org/docs/2.4/mod/mod_speling.html) with CheckCaseOnly On
apache2.conf has been set to Directory /var/www/ AllowOverride All
We did this, and if I introduce a capital letter to one of the webpages (i.e. not an upload, but is a templated blog page handled by Couch) it works - it rewrites the url to match the existing page. Unfortunately it does not do the same for the couch uploads.
I have deleted the .htaccess files in couch (that Deny all) because as soon as we implemented mod speling all of the files within /couch/uploads/ returned internal server errors. Deleting the .htaccess files within /couch/ has fixed that.
So I suppose I have 2 questions:
1) is there something I've missed that I need to do to enable the speling module to work for those files in /couch/uploads/ ?
2) does couch have a built in functionality that I've missed / can't find that would achieve this instead?
Thanks in advance!
Anthony