How to upload text file to October CMS website root

How to upload text file to October CMS website root

Sometimes you need to upload a file to the October CMS directory. The most common and typical example is uploading a sitemap.xml or robots.txt file. But if you just upload the file to the site’s directory, you won’t be able to access it via a direct link.

To be able to access a file via a direct link, you need to do this actions:

  1. Open the .htaccess file
  2. Find 'RewriteEngine On' line
  3. After it, paste the following code below
##
## Allow filename.txt
##
RewriteRule ^filename.txt - [L]

Instead of filename.txt, you need to insert the name of your file.