Santietsit Posted March 4 Share Posted March 4 Hi, I have included some Disallow directives into the robotx.txt file. The thing is that each time I create a development site at my hosting, the robot file gets updated and the directives that I've included so need to do it again. Is there any way so the existing entries are being kept? Link to comment Share on other sites More sharing options...
ps8modules Posted March 4 Share Posted March 4 (edited) Hi. override functions ./classes/Tools.php => public static function generateRobotsFile($executeHook = false) or hook actionAdminMetaAfterWriteRobotsFile or override function public static function getRobotsContent() Edited March 4 by ps8modules.com (see edit history) 1 Link to comment Share on other sites More sharing options...
Santietsit Posted March 4 Author Share Posted March 4 thanks a lot, will have a look. But I also understand there are merits on prestashop to update the file (so it can incorporate new entries) so is there a way that prestashop, when updated the robots keeps those lines too? 1 Link to comment Share on other sites More sharing options...
ps8modules Posted March 4 Share Posted March 4 (edited) Hi. Yes, if you use a hook. This item has not changed in 8 years. The following hooks are in Tools.php actionHtaccessCreate actionAdminMetaBeforeWriteRobotsFile actionAdminMetaAfterWriteRobotsFile actionClearCache actionClearCompileCache actionClearSf2Cache Edited March 4 by ps8modules.com (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now