.htaccess RewriteRule version control issue
-
I just started evaluating w3tc and came across and issue with keeping .htaccess in version control on my local dev machine.
On my local machine (WP 4.9.6, win10 pro, apache 2.4, site config’d as a VHost), w3tc adds the following to .htaccess:
RewriteCond "%{DOCUMENT_ROOT}%C:/full/windows/path/to/site/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f RewriteRule .* "C:/full/windows/path/to/site/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
whereas, on the server of the I’m testing it on (WP 4.9.6, centOS, apache 2.4), I get:
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/ ... -f RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
How can I get the install on my local machine to not include the full windows path to the site in the
Rewrite{Cond,Rule}
? I ask because this difference means that I can’t keep the .htaccess in version control.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘.htaccess RewriteRule version control issue’ is closed to new replies.