I've recently moved all my of my rules from a .htacess file into a .conf file. Now when I want to add a redirect rule to my website I have to edit the .conf file and sudo apachectl graceful
.
I've now run into a problem in that I want to be able to dynamically generate my redirect rules from PHP. Back before when I had my .htacess file running it would have been relatively easy - just include a file there that PHP has control over and all redirects would work perfectly.
Now, I could still use an include file but i'm not sure (or comfortable with) PHP running apachectl graceful
.
What is the best solution here? As I understand it with my current set up apache definately needs to be restarted in order for the .conf file to take affect, is that correct? If I returned to using .htaccess, could I just have one .htaccess in the root of the domain and restrict apache from using any other .htaccess files, so as not to slow down my server?