Skip to content

Incorrect RewriteConds and RewriteRules generated and shown on install page #1112

@jamieburchell

Description

@jamieburchell

The install page shows these rules:

RewriteCond "%{DOCUMENT_ROOT}/var/www/shared/web/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html" -f
RewriteRule .* "/var/www/shared/web/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html" [L]
...
RewriteCond "%{DOCUMENT_ROOT}/var/www/shared/web/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.xml" -f
RewriteRule .* "/var/www/shared/web/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.xml" [L]

Note RewriteCond "%{DOCUMENT_ROOT}/var/... and RewriteRule .* "/var... which are incorrect because it's adding the full path again after %{DOCUMENT_ROOT} making it /var/www/var/. The directives should have been:

RewriteCond "%{DOCUMENT_ROOT}/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html" -f
RewriteRule .* "/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html" [L]
...
RewriteCond "%{DOCUMENT_ROOT}/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.xml" -f
RewriteRule .* "/app/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SLASH}%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.xml" [L]

Version 2.8.9

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