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

  1. Please install the extension via the extension manager in typo3. Make sure, that the sysext filemetadata is installed beforehand.

  2. On your root page, please include the static template Internal Files, by clicking on Web -> Template, selecting your root page, going to Info/Edit -> Edit complete template record -> Include and by then adding the static template Internal Files in the right select box.

  3. 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)

  1. 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 under Access, 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 for PATH_TO_THIS_FOLDER and for the tx_internalfiles_mapper[storage] URL parameter with the corresponding folder's storage uid.