I
I
Ilya Beloborodov2016-05-26 16:06:00
Apache HTTP Server
Ilya Beloborodov, 2016-05-26 16:06:00

Apache2 + SSI. Why doesn't #include file="" work?

I'm moving over an old project. It uses SSI
Everywhere files are connected like this

<!--# include file="/includes/ukr/inc_block_tag_manager.html" -->

But such a line causes an error [an error occurred while processing this directive]
Googled a little, and all people who encountered this problem are offered to replace the construction above with
<!--# include virtual="/includes/rus/inc_block_tag_manager.html" -->

That's how it really works. It is unrealistic to change this in the entire project, since this construction is found in 300,000 files, and on top of all this, this construction worked on the old server six months ago.
Tell me how to make it possible to use
<!--# include file="/includes/ukr/inc_block_tag_manager.html" -->

error_log
[Thu May 26 09:19:15.106863 2016] [include:error] [pid 31821] [client 127.0.0.1:54297] AH01368: missing directive name in parsed document /var/www/theinsider/sites/example.com/insider/static/index.html

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-05-26
@alsopub

If it searches for a file "from the root of the disk", then as an option, you can create a symlink in the root /includes -> /www/site.ru/includes
Or does the include file directive not work by itself?
Are there any details in the error_log?

M
Mikhail Lyalin, 2018-01-25
@mr_jok

# include try to replace with #include

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question