Skip to content

How use [rewrite_rules][conditions] with REQUEST_FILENAME in .ini? #7816

Open
@brcontainer

Description

@brcontainer

HHVM Version

3.18.1

Standalone code, or other way to reproduce the problem

I expected to ignore only files, the folders would still go through rewrite (note that the ini is "commented"):

hhvm.virtual_host[default][check_existence_before_rewrite] = false

;hhvm.virtual_host[default][rewrite_rules][common][conditions][-d][pattern] = "%{REQUEST_FILENAME}"
;hhvm.virtual_host[default][rewrite_rules][common][conditions][-d][type] = request
;hhvm.virtual_host[default][rewrite_rules][common][conditions][-d][negate] = true

hhvm.virtual_host[default][rewrite_rules][common][conditions][-f][pattern] = "%{REQUEST_FILENAME}"
hhvm.virtual_host[default][rewrite_rules][common][conditions][-f][type] = request
hhvm.virtual_host[default][rewrite_rules][common][conditions][-f][negate] = true

hhvm.virtual_host[default][rewrite_rules][common][pattern] = "(.*)"
hhvm.virtual_host[default][rewrite_rules][common][to] = "index.php"
hhvm.virtual_host[default][rewrite_rules][common][qsa] = true

This is an "illustrative" code, I believe that -d and -f flags aren't supported.

Expected result

Ignore rewrite_rules from form pattern


I reviewed the documentation, but only found the "check_existence_before_rewrite", Is there any way to check for the existence of specific files using proxygen before applying rewrite?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions