I have a wordpress website that is using the wp default .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php?nocache [L]
</IfModule>

My needs is to set the no-cache header just for the posts that begin with the same url, for example:

example.com/content/category_to_not_be_cached/foo_post
example.com/content/category_to_not_be_cached/bar_post

but i dont get how to do that using the .htaccess

link|improve this question

feedback

1 Answer

up vote 0 down vote accepted

Example from Apache mod_headers documentation:

Header merge Cache-Control no-cache env=CGI
Header merge Cache-Control no-cache env=NO_CACHE
Header merge Cache-Control no-store env=NO_STORE

This could be wrapped in a <Directory> block or a series of <File> blocks to accommodate your needs (providing your host has enabled mod_headers).

link|improve this answer
Yes but i dont have to face with phisical files or directory, but with path aliases... – Strae Feb 14 '11 at 13:10
...but the Location directive, is what i was looking for! thanks – Strae Feb 14 '11 at 13:29
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.