Prevent that old cache files are registered as 404 when using WP Rocket
-
I’m using the Redirection plugin to register my 404 pages. But because I’m also using WP Rocket as cache plugin the Redirection plugin registers false 404’s from CSS and JS files that don’t exist anymore.
The warnings are correct. But sometimes the old CSS and JS files are removed due to new versions of the files. In some HTML cache files are still the old CSS and JS files requested. Redirection will register this as 404’s.
Based on the documentation of Redirection I have created a simple PHP snippet to ignore all the cache files in the 404 logs. You can add the snippet to the functions.php file of your theme. Visit the page below for the snippet.
[ redundant link removed ]
- This topic was modified 5 years, 9 months ago by .
- This topic was modified 5 years, 9 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Prevent that old cache files are registered as 404 when using WP Rocket’ is closed to new replies.