LINUX.ORG.RU

почему апач у хостера не понимает мой SSI?


0

1
<!--#if expr="'${QUERY_STRING}' == 'lang=ru'" -->
        <th> <a href="index.shtml?lang=ru">Основная</a></th>
        <th> <a href="products.shtml?lang=ru">Продукты</a></th>
        <th> <a href="services.shtml?lang=ru">Услуги</a></th>
        <th> <a href="concurents.shtml?lang=ru">Конкуренты</a></th>
        <th> <a href="friends.shtml?lang=ru">Друзья</a></th>
        <th> <a href="about.shtml?lang=ru">О ЧП</a></th>
        <th> <a href="contacts.shtml?lang=ru">Контакты</a></th>
        <th> <a href="extra.shtml?lang=ru">Дополнительно</a></th>
        <th> <a href="owner.shtml?lang=ru">О собственнике</a></th>
<!--#elif expr="'$QUERY_STRING' == 'lang=ua'" -->
        <th> <a href="index.shtml?lang=ua">Основна</a></th>
        <th> <a href="products.shtml?lang=ua">Продукти</a></th>
        <th> <a href="services.shtml?lang=ua">Послуги</a></th>
        <th> <a href="concurents.shtml?lang=ua">Конкуренти</a></th>
        <th> <a href="friends.shtml?lang=ua">Друзі</a></th>
        <th> <a href="about.shtml?lang=ua">Про ЧП</a></th>
        <th> <a href="contacts.shtml?lang=ua">Контакти</a></th>
        <th> <a href="extra.shtml?lang=ua">Додатково</a></th>
        <th> <a href="owner.shtml?lang=ua">Про власника</a></th>
<!--#else -->
        <th> <a href="index.shtml?lang=en">Main</a></th>
        <th> <a href="products.shtml?lang=en">Products</a></th>
        <th> <a href="services.shtml?lang=en">Services</a></th>
        <th> <a href="concurents.shtml?lang=en">Concurents</a></th>
        <th> <a href="friends.shtml?lang=en">Friends</a></th>
        <th> <a href="about.shtml?lang=en">About</a></th>
        <th> <a href="contacts.shtml?lang=en">Contacts</a></th>
        <th> <a href="extra.shtml?lang=en">Extra</a></th>
        <th> <a href="owner.shtml?lang=en">Owner</a></th>
<!--#endif -->

Ругается:

[Wed Mar  9 11:44:27 2011] [error] [client 184.73.173.66] Invalid expression "'${QUERY_STRING}' == 'lang=ru'" in file /sata1/home/users/chernooki/www/www.chernooky.com/header.shtml
[Wed Mar  9 11:44:27 2011] [error] [client 184.73.173.66] Invalid expression "'$QUERY_STRING' == 'lang=ua'" in file /sata1/home/users/chernooki/www/www.chernooky.com/header.shtml
★★★★★

Ответ на: комментарий от heisenberg
    <tr>
<!--#if expr="$QUERY_STRING=/lang=ru/" -->
        <th> <a href="index.shtml?lang=ru">Основная</a></th>
        <th> <a href="products.shtml?lang=ru">Продукты</a></th>
        <th> <a href="services.shtml?lang=ru">Услуги</a></th>
        <th> <a href="concurents.shtml?lang=ru">Конкуренты</a></th>
        <th> <a href="friends.shtml?lang=ru">Друзья</a></th>
        <th> <a href="about.shtml?lang=ru">О ЧП</a></th>
        <th> <a href="contacts.shtml?lang=ru">Контакты</a></th>
        <th> <a href="extra.shtml?lang=ru">Дополнительно</a></th>
        <th> <a href="owner.shtml?lang=ru">О собственнике</a></th>
<!--#elif expr="$QUERY_STRING=/lang=ua/" -->
        <th> <a href="index.shtml?lang=ua">Основна</a></th>
        <th> <a href="products.shtml?lang=ua">Продукти</a></th>
        <th> <a href="services.shtml?lang=ua">Послуги</a></th>
        <th> <a href="concurents.shtml?lang=ua">Конкуренти</a></th>
        <th> <a href="friends.shtml?lang=ua">Друзі</a></th>
        <th> <a href="about.shtml?lang=ua">Про ЧП</a></th>
        <th> <a href="contacts.shtml?lang=ua">Контакти</a></th>
        <th> <a href="extra.shtml?lang=ua">Додатково</a></th>
        <th> <a href="owner.shtml?lang=ua">Про власника</a></th>
<!--#else -->
        <th> <a href="index.shtml?lang=en">Main</a></th>
        <th> <a href="products.shtml?lang=en">Products</a></th>
        <th> <a href="services.shtml?lang=en">Services</a></th>
        <th> <a href="concurents.shtml?lang=en">Concurents</a></th>
        <th> <a href="friends.shtml?lang=en">Friends</a></th>
        <th> <a href="about.shtml?lang=en">About</a></th>
        <th> <a href="contacts.shtml?lang=en">Contacts</a></th>
        <th> <a href="extra.shtml?lang=en">Extra</a></th>
        <th> <a href="owner.shtml?lang=en">Owner</a></th>
<!--#endif -->
    </tr>

результат

[Wed Mar  9 12:41:04 2011] [error] [client 184.72.90.203] Invalid expression "$QUERY_STRING=/lang=ru/" in file /sata1/home/users/chernooki/www/www.chernooky.com/header.shtml
[Wed Mar  9 12:41:04 2011] [error] [client 184.72.90.203] Invalid expression "$QUERY_STRING=/lang=ua/" in file /sata1/home/users/chernooki/www/www.chernooky.com/header.shtml
cvv ★★★★★
() автор топика
Ответ на: комментарий от cvv

поддержка говорит что это возможно изза того что у них Apache 1.3. как будут выглядеть эти условия для старого SSI?

cvv ★★★★★
() автор топика
Ответ на: комментарий от heisenberg

В вашем варианте ихний апач требовал экранирования '=':

<!--#if expr=«$QUERY_STRING=/lang\=ru/» -->

почему не поехал - мой - не знаю.

cvv ★★★★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.