Hi Friends,
I am trying to implement versioning to my resource files as give here
-
http://particletree.com/notebook/automatically-version-your-css-and-javascript-files/
So, I am generating css and js file references as abcd.<datetime>.js
and want to rewrite them to abcd.js via .htaccess...
I added the rule he has given as -
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase /
####################### THIS IS WHAT I HAVE ADDED
RewriteRule ^(scripts|css|images)/(.+)\.(.+)\.(js|css|jpg|gif|png)$
$1/$2.$4
# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
#condition that says - DONT SKIP A URL WITH . AND THEN / - THIS IS
FOR AREAS WITH DOTS
RewriteCond %{REQUEST_URI} !\..*/.*$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ frontend_dev.php [QSA,L]
</IfModule>
but this doesn't seem to be working...
Can someone please help me?
Where can I find a simple to understand reference to apache rewrite
rules? Apache documentation is too hard to understand...and has no
examples...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---