Support » Plugin: Redirection » Prevent that old cache files are registered as 404 when using WP Rocket

  • Resolved Tim de Hoog

    (@tim_nl)


    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 2 years, 1 month ago by James Huff.
    • This topic was modified 2 years ago by Jan Dembowski.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author John Godley

    (@johnny5)

    If you check a redirect in the 404 list and pick ‘Ignore’ from the bulk action menu you can ignore it without the need for a plugin.

    Thread Starter Tim de Hoog

    (@tim_nl)

    Yes, I know the option to ignore URLs. But the problem is that files in the cache dir mostly have a random name like sldfjdslfdsf8saf.js and slf097235lnefd.css. So ignore that URL will only work for the current selected URLs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Prevent that old cache files are registered as 404 when using WP Rocket’ is closed to new replies.