CodeIgniter Forums

Full Version: creating robots.txt
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all. 

I'm Newbie in CI. I don't know how to create robots.txt 

 should I block controllers or views so that any bot can not index sensitive page..  Like should I use application/controllers/admin to block access to admin controller..
Please help.
Google search is your friend...
A robots.txt is just a file you can create with any text editor, it will only advise a search engine what to index and what not (note that not all crawlers will listen to your set guidelines). It's not a security measure to prevent someone from accessing a url in your project. A .htaccess file can limit that if you will.
The folders you mention in your post should not be in yourt public_html folder at all.
No need to add them to the robots.
application and system folder should allways be placed above public_html.
Just change the index.php to
$application_folder = '../application';
$system_path = '../system';