• Resolved cizsolt

    (@cizsolt)


    Hello,

    I am using Ajax Load More plugin which caches my post content IF cache file is not found on the server. When trying to access a NON EXISTING cache file it is redirected by the WP 404 Auto Redirect plugin to something similar and the cache file is never created. I do need to exclude /wp-content/uploads/alm-cache/ from the automatic redirecttions so if something is not found will return 404 and the cache files can be created as it should.

    How can I do this?

    Thank you for your help in advance!

    • This topic was modified 4 years, 3 months ago by cizsolt.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter cizsolt

    (@cizsolt)

    I figured it out thanks to reading the readme.txt file and managed to solve it with the following filter (just in case anyone else has the same issue):

    // *** Do not load the 404 Redirect plugin if the 404 URL contains 'cache'
    add_filter('wp404arsp/init', 'my_404_no_init', 10, 2);
    	function my_404_no_init($init, $query){
    		// Developers: Print $query array for more request context
    		 if (stripos($query['request']['url'], 'cache') !== false) {
    			$init = false;
    		 }
    		return $init;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Cache file not created’ is closed to new replies.