0
votes

I'm using OctoberCMS to create and manage my website, everything is working as it should.

However, I'm having trouble creating the Robots.txt file and the Sitemap.xml file from my site.

The octobercms works with the folder named "themes" I can not just put the files in it. I tried putting the files in the themes folder and gave routes error.

2
did you see my answer ? - Zakir hussain

2 Answers

0
votes

Create robots.htm file in themes/YOUR_THEME/pages folder and put below content into it

url = "/robots.txt"
==

<--- WRITE YOUR CODE HERE --->

and it will start working as you requested. you can do same for sitemap.xml file too but you just need to do small change into it.

url = "/sitemap.xml"
==

<--- WRITE YOUR CODE HERE --->

Comment below if you need more help. Thanks

0
votes

Or the easier way is to just create a robots.txt file in your web root directory then allow it to be accessed via .htaccess

RewriteRule ^robots.txt - [L]