B
B
Barmunk2016-08-08 13:48:49
htaccess
Barmunk, 2016-08-08 13:48:49

How to redirect an existing static file?

RewriteRule ^(js/main.min.js)$ http://site.ru/js/main.min.js?v1 [R=301,L]

If the file exists, then htaccess ignores the rule and returns the static file. If I remove it and redirect to another, then everything is fine

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question