So, I would like my htaccess file to check if a file exists and if it doesn't then redirect to another file. How would I go about doing this?
You can set a 404 redirect so that if any file does not exist it redirects to your index page. The landing page can by any one you want. Add the code in .htaccess This can be achieved from your hosting provider's control panel.
But, I don't want a redirect to the index page. I want a redirect to a different file. Like say for instance that I have the same file located in two different folders, possibly one on another server. Let's say that just incase one of the files doesn't exist it'll load the other one. How can I do that?
Change the index.php to the file you want to. You can change the landing page they way you want to. I mentioned index page just for an example.
Can you write out an example since that's what I'm looking for. So, if file a doesn't exist, redirect to file b but actually have the whole thing written out. Thank you.