Title: Error 404
Last modified: August 30, 2016

---

# Error 404

 *  Resolved [simonnicol](https://wordpress.org/support/users/simonnicol/)
 * (@simonnicol)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-404-481/)
 * I love this plugin don’t get me wrong but I’m getting the following 404 error
   message which is from gtmetrix.com
 * The following requests are returning 404/410 responses. Either fix the broken
   links, or remove the references to the non-existent resources.
 * [http://mydomainname.co.uk/wp-content/uploads/am_assets/head-only%20screen%20and%20(max-width:%20768px)-7cfb3627231841432403234ed8558ac6.css](http://mydomainname.co.uk/wp-content/uploads/am_assets/head-only%20screen%20and%20(max-width:%20768px)-7cfb3627231841432403234ed8558ac6.css)
 * [https://wordpress.org/plugins/assetsminify/](https://wordpress.org/plugins/assetsminify/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [simonnicol](https://wordpress.org/support/users/simonnicol/)
 * (@simonnicol)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-404-481/#post-6312495)
 * Thought I’d try and be a little more helpful.
    If I go to the /wp-content/uploads/
   am_assets directory on my server there are 18 files all of them but 2 look fine
   with a fileneme/number sequence.
 * BUT as I say there are 2 files, one called:
 * ‘head-only screen and (max-width’
 * That’s it, no file extension or following number sequence and the file is 0 bytes.
 * And the other file is called:
 * ‘only screen and (max-width’ again with no extension and 0 byte.
 * Would you mind taking a look please? If I can be of any further help, don’t hesitate
   to ask.
 * Many thanks! 🙂
 *  Thread Starter [simonnicol](https://wordpress.org/support/users/simonnicol/)
 * (@simonnicol)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-404-481/#post-6312676)
 * Having researched a bit further it would appear that Linux allows a : (colon)
   in the filename where Windows does not. It is this omission that is the root 
   cause of the problem. The second Windows comes across a : the file naming process
   stops – Thus the strangely truncated filenames with no extensions.
 * Dear author can you please fix this, it should only take you a few minutes and
   it would make your plugin 100% compatible.
 * 🙂
 *  Thread Starter [simonnicol](https://wordpress.org/support/users/simonnicol/)
 * (@simonnicol)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-404-481/#post-6312677)
 * Couldn’t wait so looked for the bug/oversight myself. If you open the Css.php
   file located below
 * src\AssetsMinify\Assets\Css.php
 * And go to line (I think it was 111) where you have the code
 * `$cachedFilename = "head-$media-$mtime.css";`
 * Add this directly underneath it:
 * `// Removes all invalid characters from the filename`
    `// Windows or any other
   non Linux OS doesn't allow.`
 * `$remove = array(":", "?");`
    `$cachedFilename = str_replace($remove, "", $cachedFilename);`
 * I created an array so any further modifications or invalid characters can be 
   added if needed.
 * Now my site isn’t looking for a file that isn’t there generating a 404 error 
   and also causing an http redirection it has reduced my site loading time by over
   a second.
 * Best wishes
 * Simon
 *  Thread Starter [simonnicol](https://wordpress.org/support/users/simonnicol/)
 * (@simonnicol)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/error-404-481/#post-6312678)
 * P.S
 * I cannot mark this as Resolved as I am not the author of this really very nice
   plugin. Though I have fixed it personally for my own site if the above code isn’t
   included in future releases of this plugin the problem will still remain.
 * Best wishes
 * Simon

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error 404’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/assetsminify.svg)
 * [AssetsMinify](https://wordpress.org/plugins/assetsminify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/assetsminify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/assetsminify/)
 * [Active Topics](https://wordpress.org/support/plugin/assetsminify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/assetsminify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/assetsminify/reviews/)

## Tags

 * [error 404](https://wordpress.org/support/topic-tag/error-404/)

 * 4 replies
 * 1 participant
 * Last reply from: [simonnicol](https://wordpress.org/support/users/simonnicol/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/error-404-481/#post-6312678)
 * Status: resolved