• Hi,

    in my web server, which is installed with Apache 2.4.6,
    I have this following error:

    [Tue Nov 18 xx:xx:xx.962550 2014] [core:alert] [pid 4043] [client xxx:45614] /home/xxx/var/www/html/wp-content/plugins/akismet/.htaccess: Invalid command ‘Order’, perhaps misspelled or defined by a module not included in the server configuration, referer: https://www.xxx.com/wp-admin/

    With Apache 2.2.* I didn’t have this issue, it’s because Apache 2.4.* doesn’t like teses lines:
    Order Deny,Allow
    Deny from all

    and “Allow from all”

    You can see the doc: http://httpd.apache.org/docs/current/upgrading.html

    So in order to take in account both versions of Apache, you should be modify the htaccess like this:

    # Apache 2.4
    <IfModule mod_authz_core.c>
    Require all denied

    <FilesMatch “^(form|akismet)\.(css|js)$”>
    Require all granted
    </FilesMatch>

    #allow access to any image
    <FilesMatch “^(.+)\.(png|gif)$”>
    Require all granted
    </FilesMatch>
    </IfModule>

    # Apache 2.2
    <IfModule !mod_authz_core.c>
    Order Deny,Allow
    Deny from all

    <FilesMatch “^(form|akismet)\.(css|js)$”>
    Allow from all
    </FilesMatch>

    #allow access to any image
    <FilesMatch “^(.+)\.(png|gif)$”>
    Allow from all
    </FilesMatch>
    </IfModule>

    Thanks.

    https://wordpress.org/plugins/akismet/

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘htaccess file is not compatible with all versions of Apache like 2.4 and’ is closed to new replies.