1
1
# Canonical URL header for files
2
2
3
3
This TYPO3 extension adds canonical url headers to files (images, PDFs...),
4
- depending on the file storage the files are located in. Storages can be
4
+ depending on the file storage the files are located in. Storages can be
5
5
linked to specific sites (respectively site configurations), so all files
6
- located in that storage are delivered with an additional canonical header
6
+ located in that storage are delivered with an additional canonical header
7
7
pointing to the domain of the according site.
8
8
9
9
Let's say a TYPO3 instance serves two domains, [ example.at] ( https://example.at )
10
- and [ example.de] ( https://example.de ) , wich have two file storages defined
11
- respectively, ` storage-at ` and ` storage-de ` . Then a file provided for
12
- download on domain [ example.at] ( https://example.at ) but physically located in
10
+ and [ example.de] ( https://example.de ) , wich have two file storages defined
11
+ respectively, ` storage-at ` and ` storage-de ` . Then a file provided for
12
+ download on domain [ example.at] ( https://example.at ) but physically located in
13
13
` storage-de ` will be delivered with the canonical header
14
14
` https://example.de/fileadmin/.... `
15
15
@@ -31,8 +31,8 @@ and set the field `Site` in the tab `Canonical Files` accordingly. All files
31
31
stored within such a file storage will get the base, respectively base
32
32
variant, of this site configuration as canonical header.
33
33
34
- To make this happen, files have to be routed through TYPO3: Add the
35
- following lines to your project's .htaccess file (amend
34
+ To make this happen, files have to be routed through TYPO3: Add the
35
+ following lines to your project's .htaccess file (amend
36
36
accordingly):
37
37
38
38
```
@@ -41,6 +41,17 @@ RewriteCond %{REQUEST_FILENAME} \.(pdf|doc|docx|xls|xlsx|ppt|pptx)$
41
41
RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L]
42
42
```
43
43
44
+ ### Optional
45
+
46
+ It makes sense to prevent editors to upload files directly from file reference
47
+ fields within backend forms. Add this to your TSconfig to apply it globally:
48
+ ```
49
+ setup.override {
50
+ edit_docModuleUpload = 0
51
+ }
52
+ setup.fields.edit_docModuleUpload.disabled = 1
53
+ ```
54
+
44
55
## Legal
45
56
46
57
### License
0 commit comments