Jump to content

best way to change .htaccess files?


Recommended Posts

I have a problem with my server caching stuff on their end.  They told me how to stop it, and it involves adding a line to .htaccess.  But there are dozens of .htaccess... do I add it to all of them?  Is there a simple way to do that?  What's the best way please.

Link to comment
Share on other sites

You need add that you want only in one file, that lies in site root folder.


And add your code before this line:

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again


Edited by Kerm (see edit history)
Link to comment
Share on other sites

Ahh, OK thanks.  So are all the sub-folder .htaccess files inheriting the properties of the ones in the site root?

Also when you say "site root", does it have to be at /  or is it ok to put it at /store so it isn't affecting (for example) my /blog, etc?  (in case it isn't obvious, prestashop is installed in /store).  Ie. Site root, or prestashop root?

Link to comment
Share on other sites

Whoops... that just resulted in an error 500


This is what I added to the top of the file:

Header set Cache-Control "max-age=0, private, no-cache, no-store, must-revalidate"

I copy/pasted it from what the host told me to do.   Maybe it needs a semicolor or something?

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...