Downloading orginal image file using ?nocache (nginx)
-
add_filter( 'webpc_htaccess_mod_rewrite', function ( $rules ) { return preg_replace( '/(RewriteCond %{HTTP_ACCEPT} image\/(?:[a-z]+))/', '$1' . PHP_EOL . ' RewriteCond %{QUERY_STRING} !(^|&)' . 'nocache' . ' [NC]', $rules ); } );
I’m using the above snippet to download original files from media using suffix
?nocache
.On nginx server it doesn’t work. Is there any alternative method?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Downloading orginal image file using ?nocache (nginx)’ is closed to new replies.