I have a lot of image and pdf files in a folder within the public_html
directory, and I have a lot of scripts on public_html dynamically processing, creating and editing these files based on user requests.
Now the problem is that I've realized that having these files stored in folders in public_html
isn't safe, maybe someone could just inject some script and delete them all! So what I want to do is move them outside public_html. However - since I have so very many scripts dealing with all these files, all the paths will be messed up. I am using scripts that use relative paths, (/home/public_html/designs/product1/...
) as well as scripts that use absolute paths (www.mydomain.com/designs/product1/...
).
I don't know much about symbolic links to be honest - I've read up some but I found it confusing since I'm not that good with Linux either.
My question is: is there any way that I can put some kind of symbolic link or connection, so that I can move all my product design files outside public_html, and yet don't have to change all my scripts to point to the new path? So maybe, some kind of code that resolves all public_html/designs/
requests from my scripts to the new path? Maybe symbolic links isn't what I need here, but something else?