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 some old html pages that have SSI includes in them to include certain html in all the pages.

So, the SSI looks something like this:

<!--#include virtual="/includes/noNav/footercode.html"-->

But I want to move that included file from /includes/noNav/footercode.html to /includes/footercode.html so I implemented a redirect in an .htaccess file like this:

# Redirect permanent /includes/noNav/footercode.html

But now I get errors saying "unable to include "/includes/noNav/footercode.html" in parsed file" So, do redirects not work on included files?

Also, if I browse directly to the old path, it will correctly redirect me. But it fails if the path is included.

share|improve this question
up vote 2 down vote accepted

The SSI is parsed as part of the apache SSI module and does not make web requests back to Apache in order to retrieve the file. As it does not use HTTP back to Apache to retrieve the files specified by #include, no rewrite or redirect rules are applied.

The virtual= directive finds a file starting at ServerRoot, while the file= directive finds a file in the same directory as the current page.

share|improve this answer

Your Answer


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.