Skip to content

Instantly share code, notes, and snippets.

@seoagentur-hamburg
Created April 25, 2016 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seoagentur-hamburg/b0faccb2b2a09e0b1a6f1e823b521375 to your computer and use it in GitHub Desktop.
Save seoagentur-hamburg/b0faccb2b2a09e0b1a6f1e823b521375 to your computer and use it in GitHub Desktop.
# BEGIN WordPress
<IfModule mod_rewrite.c>
#### Allow versioning for js and css files
RewriteEngine On
RewriteRule ^(.*)\.[\d]+\.(css)$ $1.$2 [L] # Strip out the version number
#### End Allow versioning for js and css files
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@rob-st
Copy link

rob-st commented Oct 14, 2016

Um den Rewrite auch für JS Dateien geltend zu machen, muss diese Dateiendung noch ergänzt werden:
RewriteRule ^(.*)\.[\d]+\.(css|js)$ $1.$2 [L] # Strip out the version number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment