The .htaccess
cache settings for HTML5 Boilerplate (http://html5boilerplate.com/) are awesome, but I’m running into an issue with the cache busting settings for JS and CSS versioning.
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).(d+).(js|css|png|jpg|gif)$ $1.$3 [L]
</IfModule>
I can’t seem to get this to work with the WordPress rewrite settings already present in the .htaccess
file.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
At best, the rewrite on my JS files never happens. At worst, it breaks the site.
Anyone had any luck getting this to work with WordPress?
Can you make some php.ini settings embeded into your .htaccess and then test website for changes, Just to test even if you .htaccess file working or not?
In most cases I have experienced that, there are a few hidden files which CentOS 5.5 based systems does not show (don’t know if its already known bug). But if you create a new file with same name .htaccess you will see a few different lines than your original one.
Simply means both are two different files. So just try to check which one is working with your website. Moreover for compressing JS and CSS files, I have written a quite detailed tutorial here
http://www.codeandcommand.com/web-based/how-to-optimize-joomla-3-x-pagespeed.html
RewriteLog 2
(or higher) and then look at the rewrite logs. They’re hard to follow but they can give you some clues.Change WordPress’s rule to
and see if that helps.
Are you seeing WordPress’s “not found” response or Apache’s?
Apache server error or WordPress error?
Try these