Score:0

Apache/2.4.43 -> .htaccess -> require Rule not working

th flag

I have /srv/www/vhosts/wp_website/wp-content/.htaccess with the following content:

    Require all denied
    <Files ~ ".(xml|css|js|jpe?g|png|gif|pdf|docx|rtf|odf|zip|rar)$">
    Require all granted
    </Files>

But the file /srv/www/vhosts/wp_website/themes/responsive/css/custom_script.css gets a 403 error.

If I rename .htaccess do deactivate it, it works.

1.) Are the rules correct and they should propagate also to subfolders?
2.) Is it possible that when I have the module mod_access_compat active that then only the old style rules Order allow,deny Deny from all work? Normally I think that with the mod_access_compat both rules are possible or do I have to use <IfModule mod_access_compat.c> and then the old style rules?

djdomi avatar
za flag
if i remember correctly you need both, and moreover the deny rulw infront od tge allow
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.