DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
Administrator Manual¶
As an administrator your only task is the correct installation:
Installation¶
Please install the extension via the
extension manager
in typo3. Make sure, that the sysextfilemetadata
is installed beforehand.On your root page, please include the static template
Internal Files
, by clicking onWeb
->Template
, selecting your root page, going toInfo/Edit
->Edit complete template record
->Include
and by then adding the static templateInternal Files
in the right select box.Finally create a
.htaccess
file in the folder in your file system that you want to secure against unauthorized access. The.htaccess
file's content should be:<IfModule mod_rewrite.c> # Enable URL rewriting RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f RewriteRule ^(.*)$ /index.php?tx_internalfiles[bypassrealurl]=true&type=665&PATH_TO_THIS_FOLDER/tx_internalfiles_mapper[file]=$1&tx_internalfiles_mapper[storage]=1 [L] </IfModule>
Note
Replace PATH_TO_THIS_FOLDER
by the relative path to the secure folder from the root of the underlying storage (e.g. if your folder is fileadmin/folder/subfolder/secure
, then PATH_TO_THIS_FOLDER
is folder/subfolder
and the storage is fileadmin
).
Note
Please make sure, that the uid of the storage your secure folder lies in is set correctly via the URL parameter tx_internalfiles_mapper[storage]=uid
in the .htaccess
. If your folder lies in fileadmin
(auto-generated typo3 folder) then the uid 1 is correct. Otherwise you might change the storage uid to the correct value (2, 3, ...).
Tip
An example _.htaccess
file is located in EXT:internalfiles/Resources/Private
)
- Normally that should be it. Now every file in your selected folder is secured. You have to grant a feuser group access to a file via
File
->File List
and by editing a file's metadata in your secure folder underAccess
, before the file can be viewed by a logged in frontend user with the correct feuser group.
Optional:¶
- You can change the default
pageType 665
for accessing the InternFilesMapper, by setting a different value in your typoscript setup in your root page (see above on how to get to your typoscript template):
plugin.tx_internalfiles_mapper {
settings {
mapperPageType = 665
}
}
Note
Then of course you'll have to change the URL parameter type=665
in your .htaccess
file.
- You can of course secure multiple folders against unauthorized access. Each folder has to contain a
.htaccess
file with the correct value forPATH_TO_THIS_FOLDER
and for thetx_internalfiles_mapper[storage]
URL parameter with the corresponding folder's storage uid.