diff --git a/inc/setup/cachify.hdd.htaccess.php b/inc/setup/cachify.hdd.htaccess.php index bc8d9697..e22c7c1c 100644 --- a/inc/setup/cachify.hdd.htaccess.php +++ b/inc/setup/cachify.hdd.htaccess.php @@ -19,12 +19,6 @@ RewriteCond %{HTTPS} off RewriteRule .* - [E=CACHIFY_HOST:%{HTTP_HOST}] - # set subdirectory - RewriteCond %{REQUEST_URI} /$ - RewriteRule .* - [E=CACHIFY_DIR:%{REQUEST_URI}] - RewriteCond %{REQUEST_URI} ^$ - RewriteRule .* - [E=CACHIFY_DIR:/] - # gzip RewriteRule .* - [E=CACHIFY_SUFFIX:] <IfModule mod_mime.c> @@ -35,16 +29,17 @@ </IfModule> # Main Rules + RewriteCond %{REQUEST_URI} /$ RewriteCond %{REQUEST_METHOD} !=POST - RewriteCond %{QUERY_STRING} ="" - RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.* - RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_ + RewriteCond %{QUERY_STRING} ^$ + RewriteCond %{REQUEST_URI} !^\/(wp\-admin|wp\-content\/cache)\/.* + RewriteCond %{HTTP_COOKIE} !(wp\-postpass|wordpress_logged_in|comment_author)_ RewriteCond '; -$middle = '/cache/cachify/%{ENV:CACHIFY_HOST}%{ENV:CACHIFY_DIR}index.html -f +$middle = '/cache/cachify/%{ENV:CACHIFY_HOST}%{REQUEST_URI}index\.html -f RewriteRule ^(.*) '; -$ending = '/cache/cachify/%{ENV:CACHIFY_HOST}%{ENV:CACHIFY_DIR}index.html%{ENV:CACHIFY_SUFFIX} [L] +$ending = '/cache/cachify/%{ENV:CACHIFY_HOST}%{REQUEST_URI}index\.html%{ENV:CACHIFY_SUFFIX} [L,NS] </IfModule> # END CACHIFY'; ?>