I have a specific file, let's call it 'myfile.abc', that I need to have redirected to a specific location, no matter what location it's requested from. For instance:
/folder1/myfile.abc
/folder2/myfile.abc
/folder3/myfile.abc
I need all the above to be redirected to (as an example):
/myfolder/myfile.abc
How do I achieve that within the .htaccess file?
In response to Gumbo's answer, I now have the following in my .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !=myfolder
RewriteRule ^([^/]+)/myfile.abc$ myfolder/myfile.abc [L]
RewriteRule . /index.php [L]
</IfModule>