Answer the question
In order to leave comments, you need to log in
How to add a parameter to a request via htaccess?
How to make it so that when accessing .css, the GET parameter v=0.5 is added.
That is,
mysite/css/main.css
turns into
mysite/css/main.css? v=0.5
p/s: it is desirable that this change be visible in the address bar
Answer the question
In order to leave comments, you need to log in
More or less like this
RewriteEngine On
RewriteRule ^/css/main\.css$ /css/main.css?v=0.5 [L]
RewriteEngine On
RewriteRule ^([a-z0-9]+\.css)$ /css/$1?v=0.5 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question