I am using htaccess redirect to send missing assets to Apache 404 for optimization.
# BEGIN Apache 404 for broken resouces
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(jpg|jpeg|png|gif|ico|icns|swf|bmp|css|js)$ - [nocase,redirect=404,last]
# END Apache 404 for broken resouces
Although this should also serve the last file if file is missing I'd like to update this with the following to avoid caching issues:
- if bundle.[version].js or bundle.[version].css is missing serve bundle.js or bundle.css instead. Currently unable to achieve this. Any ideas to improve this?