Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Our web pages use header and footer SSI includes and I'd like to insert some content specific to particular directories from within these.

For example, say the header is located at /includes/header.htm and for the page /docs/example.htm I want to include the file /docs/_info.htm
Similarly for /contact/example2.htm I'd want to insert /contact/_info.htm

If I use <!--#include virtual="_info.htm" --> the SSI looks in it's own location, i.e. for /includes/_info.htm

Is there a way I can reference the current parent document directory from within the centrally located SSI?

share|improve this question

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.