Skip to content

Apache 2.4 e .htaccess erro 500 provocado pela diretiva FilterProvider #12

@alande-amorim

Description

@alande-amorim

.htaccess gerando Internal Server Error no apache 2.4. Registro de log de erro do apache:

[Tue Aug 20 09:51:12.295370 2013] [core:alert] [pid 24538] [client 127.0.0.1:37392] /var/www/FacilMVC/.htaccess: FilterProvider takes three arguments, filter-name provider-name match-expression

Segundo http://httpd.apache.org/docs/2.4/upgrading.html :

mod_filter: FilterProvider syntax has changed and now uses a boolean expression to determine if a filter is applied.

De acordo com http://httpd.apache.org/docs/2.4/mod/mod_filter.html#upgrade :

The FilterProvider directive has changed from httpd 2.2: the match and dispatch arguments are replaced with a single but more versatile expression. In general, you can convert a match/dispatch pair to the two sides of an expression, using something like:

Solução, no apache 2.4, substituir as diretivas FilterProvider no .htacces de:

FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
...

Para:

FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} = 'text/html'"
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions