For several sites on one server I want to be able to redirect certain ip addresses to a different location (301 redirect) using .htaccess. The text files containing the ip addresses are located on a central website owned by me. The ip’s in this text file are updated daily.
What I want is a program that runs once a day. It updates the all the htaccess files of selected users with a 301 redirect for latest set of ip addresses.
- Linux Redhat server.
- Text files containing the ip’s have fixed names ([url removed, login to view], [url removed, login to view]).
- Text files containing the ip’s contain comment lines starting with ‘#’.
- Tool should run once a day at a time I determine.
- I cannot give access to the server so you should give me some directions on how to install and manage the tool
- I’m not very familiar with directory permissions in Linux. Maybe the tool should run as root to be able to access the public_html directories of the different users? We can simply try this a few times using test domains.
If you know other tricks for solving this problem you are welcome to respond! I know how the program should work but I’m simply not experienced enough with Linux