Let's say I have the following urls:
site/DB/guest/picture/25-298.jpg?v=140913231208
site/DB/guest/picture/25.jpg?v=140913231208
site/DB/user/cover/27-40.jpg?v=160913051508
site/DB/user/cover/27.jpg?v=160913051508
site/JS/main.js?v=160913132025
site/JS/utils/admin.js?v=1602144214027
site/CSS/main.css?v=160913132038
I want to be able to load them by accessing urls below:
guest/picture/140913231208/25-298.jpg
guest/picture/140913231208/25.jpg
user/cover/160913051508/27-40.jpg
user/cover/160913051508/27.jpg
js/160913132025/main.js
js/utils/1602144214027/admin.js
css/160913132038/main.css
I've tried to Rewrite some Rules. But I always get the Not Found Error.
For example:
RewriteRule ^js/(.*)/(.*).(.*)$ site/JS/$2.$3\?v=$1 [L]