Robots.txt and sitemap.xml

Hello

I placed both files into the root of the website. The files can not accessed: A 404 error occurs.
Probably a route or so is needed.

I tried this:

    ##
    ## Allow robots.txt and sitemap.xml
    ##
    RewriteRule ^robots.txt - [L]
    RewriteRule ^sitemap.xml - [L]

Something is missing yet or is wrong.
I don’t want to use a plugin for this. It is not needed to manage the files from the Backend.

Any idea?

Thank you!

Self answer:

Add this to the “Allowed folder” or create a new section “Allow files” to the file .htaccess:

 RewriteCond %{REQUEST_FILENAME} !/robots\.txt
 RewriteCond %{REQUEST_FILENAME} !/sitemap\.xm

That’s all!