Skip to content

Commit

Permalink
UPDATE: Remove / + and = characters from hash for URL
Browse files Browse the repository at this point in the history
  • Loading branch information
stecman committed Jul 10, 2013
1 parent c601ca9 commit fe2aebf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The following is required in your root `.htaccess` file.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(v[A-Za-z0-9\+]+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
RewriteRule ^(.+)\.(v[A-Za-z0-9]+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
</IfModule>
```

Expand Down
2 changes: 1 addition & 1 deletion code/HashPathExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function HashFile($path, $theme = true)

if (file_exists($path)) {
$hash = md5_file($path);
return preg_replace('/=+$/', '', base64_encode(pack('H*', $hash)));
return str_replace(array('/', '+','='), '', base64_encode(pack('H*', $hash)));
}

return '';
Expand Down

0 comments on commit fe2aebf

Please sign in to comment.