Is it possible to configure caching for a specific url?

Is it possible to configure caching of the website for a certain url of the site? That is, I have a website example.com there cache is disabled. But for example.com/d/* should work with caching. How to set using .htaccess?
April 3rd 20 at 18:53
1 answer
April 3rd 20 at 18:55
example.com/d/.htaccess will only affect example.com/d/.
That is, we need to create another htaccess file with a specific name - example.com/d/.htaccess ? - Elmore_Ankunding25 commented on April 3rd 20 at 18:58
Each directory can have its own .htaccess affects the directory (and its subdirectories). This is elementary. - lennie.Quigley commented on April 3rd 20 at 19:01
@lennie.Quigley, my site irkmix.top - forum. I need for the pages of questions (irkmix.top/d/1595) was set up in the header: Header set Cache-Control "public, max-age=2100", and for the home page: Header set Cache-Control "no-cache" - Elmore_Ankunding25 commented on April 3rd 20 at 19:04
@Elmore_Ankunding25, well, if page is /d/* generates some kind of php script, it is logical to use a headeron the php side, not in htaccess. - leanne_Boyle commented on April 3rd 20 at 19:07

Find more questions by tags htaccess