usualoma/mt-plugin-DataAPIPublicCache/master/dot.htaccess - Htaccess File

usualoma/mt-plugin-DataAPIPublicCache/master/dot.htaccess

RewriteEngine On
RewriteBase /mt/

RewriteCond %{HTTP:X-MT-Authorization} =""
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{QUERY_STRING} ^[a-zA-Z0-9!""$%&'()=~^|\{[`@}]*:+;_?/>.<,-]*$
RewriteRule data-api.cgi/(v.*) mt-static/support/data-api-public-cache/$1/%{QUERY_STRING}c.js [N,E=HTTP_X_DATA_API_PUBLIC_CACHE_TRY:1]

RewriteRule (mt-static/support/data-api-public-cache/.*?)%(.*c.js)/vd+ "$1 $2" [N]
RewriteRule (mt-static/support/data-api-public-cache/.*?)/..(.*c.js)/vd+ $1/_..@$2 [N]
RewriteRule (mt-static/support/data-api-public-cache/.*?)(/[^/]{250})([^/].*c.js)/vd+ $1$2/$3 [N]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{ENV:HTTP_X_DATA_API_PUBLIC_CACHE_TRY} =1
RewriteRule mt-static/support/data-api-public-cache/(.*c.js)/vd+ mt-data-api.cgi [L,E=HTTP_X_DATA_API_PUBLIC_CACHE_FILENAME:$1]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{ENV:HTTP_X_DATA_API_PUBLIC_CACHE_TRY} !=1
RewriteRule mt-static/support/data-api-public-cache/ - [R=403,L]

On Github License

Files

Download PDF of Htaccess file
CACHE, ENV, GET, QUERY_STRING, REQUEST_METHOD, SCRIPT_FILENAME, static

Comments

Apache