I'm just wondering how to use a variable for vhost directory within my ReWrite Rules
I am using WordPressMU and W3-Total-Cache. W3TC instructs to use some ReWrite rules, which uses the root directory of the vhost
like
RewriteCond /home/apset/public_html/wp-content/w3tc-%{ENVOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
where "apset" is the directory of the vhost. Now I have different directory with WP installations. I want to put a variable there so the RewriteCond is same for all my directory installation. I'm wondering, how to use the $VH_NAME in it?
Please give me direction.
here is the full Rewrite rules
# BEGIN W3 Total Cache
<IfModule mod_setenvif.c>
SetEnvIfNoCase Host ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?[0-9]+)?$ DOMAIN=$2
SetEnvIfNoCase Accept-Encoding (gzip|deflate) APPEND_EXT=.$1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR]
RewriteCond %{REQUEST_URI} (wp\-comments\-popup\.php|wp\-links\-opml\.php|wp\-locations\.php) [NC]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|wordpress_\[a\-f0\-9\]\+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
RewriteCond /home/apset/public_html/wp-content/w3tc-%{ENVOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
RewriteRule (.*) wp-content/w3tc-%{ENVOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
</IfModule>
# END W3 Total Cache
I am using WordPressMU and W3-Total-Cache. W3TC instructs to use some ReWrite rules, which uses the root directory of the vhost
like
RewriteCond /home/apset/public_html/wp-content/w3tc-%{ENVOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
where "apset" is the directory of the vhost. Now I have different directory with WP installations. I want to put a variable there so the RewriteCond is same for all my directory installation. I'm wondering, how to use the $VH_NAME in it?
Please give me direction.
here is the full Rewrite rules
# BEGIN W3 Total Cache
<IfModule mod_setenvif.c>
SetEnvIfNoCase Host ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?[0-9]+)?$ DOMAIN=$2
SetEnvIfNoCase Accept-Encoding (gzip|deflate) APPEND_EXT=.$1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register).php|wp-.*\.php|index\.php) [OR]
RewriteCond %{REQUEST_URI} (wp\-comments\-popup\.php|wp\-links\-opml\.php|wp\-locations\.php) [NC]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =""
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|wordpress_\[a\-f0\-9\]\+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(bot|ia_archive|slurp|crawl|spider) [NC]
RewriteCond /home/apset/public_html/wp-content/w3tc-%{ENVOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
RewriteRule (.*) wp-content/w3tc-%{ENVOMAIN}/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]
</IfModule>
# END W3 Total Cache