Webmasters Stack Exchange is a question and answer site for pro webmasters. 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

DirectoryIndexRedirect is available in version 2.3.14 and later. (mod_dir)

Is there an alternative method for older versions? I have different DirectoryIndex directive sets for a lot of directories and would like a generic rule I can apply on the root directory. That way I would not have to maintain separate redirect rules for each directory.

share|improve this question
I guess you already have separate .htaccess files for each subdirectory, rather than one common one in the root? – w3dk Jan 22 '13 at 9:27
I have one in the root with alle the <Directory>s. – Aeyoun Jan 23 '13 at 10:28
In that case, have you considered using mod_rewrite/RewriteRule instead of DirectoryIndex, although you seem to suggest that this would be more trouble? – w3dk Jan 23 '13 at 10:34

Your Answer


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

Browse other questions tagged or ask your own question.