I have some links on my website with page version and I want visitors redirected to the same page but without version number.
I got help before by {arkascha} with this code in .htaccess to affect all links, but i couldn't modify it to make exception for css and js files because visitors cannot load new version of css and js on my site because the code.
RewriteEngine on
RewriteCond %{QUERY_STRING} ^v=\d+$
RewriteRule ^ %{REQUEST_URI} [QSD,R=301,L]
example pages with version
example.com/folder/locatedpage?v=1
example.com/folder/locatedpage?v=2
example.com/folder/locatedpage?v=3
example page after the code applied through htaccess
example.com/folder/locatedpage
I want the same code above but with exception for css and js files.