Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have number of directories under Apache webserver on linux. I need a file - index.html in each directory. Can I keep a master index.html file in a specific location and tell apache to use this just incase there is no real index.html file in one of the sub directories ?

share|improve this question

Try something like this (You need to enable Mod_rewrite)

RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/user_dir/index.html !-f
RewriteRule (.*) /master_dir/index.html [L] 
share|improve this answer

Your Answer


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