Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I manage 400+ wordpress blogs across 8 shared hosting accounts and I'm looking for a simple way to distribute changes to certain files.

In particular, I want to push out the same .htaccess file to the root of each blog, that restricts access to the http://domain.com/wp-admin/ folder to a specified list of IP addresses.

An alternative is to pull the rules in via some kind of http:// include. Is this possible inside a .htaccess?

Or maybe I'm going about this all wrong. What would you suggest?

share|improve this question
    
Sadly there isn't a way to include/call other .htaccess files. Do just host wordpress blogs? Have you changed the rewrite rules significantly in the exist .htaccess files or are they out of the box? –  booyaa Apr 23 '12 at 8:12

1 Answer 1

This kind of problem simply screams out "scripting". In essence:

  • Create a master copy of the file to distribute
  • Create a list of the places a file needs to go
  • Have the script read the list of destinations and copy the master file to each

If you change the master file or the list of destinations simply rerun the script. Extremely simple and extremely effective.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.