I moved .rar files to old-files/ directory and I wanna redirect any url which ended by .rar to /old-files directory .
example: redirect www.example.com/file.rar to www.example.com/old-files/file.rar
this is my code:
RewriteCond %{REQUEST_URI} ^.*/([^\.]+)\.rar/? [NC]
RewriteRule ^(.*).rar$ /old-files/$1.rar [R=301,NC,L]
but it's not working correctly , so any help ?!
and thank you