Should editors be able to create redirects for "fileadmin/"?


editors are able to create redirects for any kind of URL in the TYPO3 redirect module. I know the path segment for the TYPO3 fileadmin can be renamed but for simplicity lets assume it’s the default ‘/fileadmin/’. Unfortunately redirects do not work for URLs starting with ‘/fileadmin/’ because TYPO3 is not responsible by the default .htaccess configuration. This is the default behaviour because the webserver should take care of the file management and show it’s 404 page if a file does not exist:

# Stop rewrite processing, if we are in any other known directory
# NOTE: Add your additional local storages here
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|uploads/) - [L]

My questions:

  • Should we remove fileadmin in this RewriteRule? I put forward that a bad regex rule could break the whole requests for all files and file requests may insignificant slow down.
  • Should we at least add an TYPO3 message in the backend that this redirects are not working?

What do you think?

Best regards

Hi Daniel!

You should be able to remove fileadmin from the rule. Redirects will still only happen if the file doesn’t exist, but I guess that’s what you want.

A bad redirect rule could theoretically block access to all pages too, so it’s not only valid for fileadmin.

The line itself is at least 19 years old, and excluding file directories may have been done to avoid spending unnecessary server resources. I can’t find any historical documentation of the reasoning behind it.

Sounds like a good idea to consider that. Feel free to submit a feature request.

— Mathias

1 Like