Jump to content

Robots.txt update (how to keep existing data when prestashop refresh file)


Recommended Posts

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

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?

  • Like 1
Link to comment
Share on other sites

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 by ps8modules.com (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...