On Sun, Sep 14, 2014 at 4:03 AM, Simen Mangseth <s...@live.no> wrote:

>  Thanks for your reply, Yehuda. However, I can’t get any of your
> suggestions to work. You can get the whole file if you want, but for the
> time being, I’ll just send the pieces of code that doesn’t work.
>
> Here’s the new if-code:
> <!--#if expr="%{SERVER_NAME} =~ /dans.no/ || %{SERVER_NAME} =~
> /dans.dansas/" -->
> <!--#set var="side" value="dans" -->
> <!--#elif expr="%{SERVER_NAME} =~ /dedanseglade/ || %{SERVER_NAME} =~ /
> dd.no/" -->
> <!--#set var="side" value="dd" -->
> <!--#elif expr="%{SERVER_NAME} =~ /gullskoen/" -->
> <!--#set var="side" value="gullskoen" -->
> <!--#elif expr="%{SERVER_NAME} =~ /ddcountry/" -->
> <!--#set var="side" value="ddcountry" -->
> <!--#endif -->
>

I took this exact code and changed the URLs to match several that point to
my server and it worked fine. What URLs are you expecting to hit?
I can add them to my hosts file and see if they match.


> Now nothing works, not even the two last ones with no “||”-expression that
> worked before.
>
> I still use this to reference to this, though:
> <!--#if expr="side = dd" -->DeDanseglade
> <!--#elif expr="$side = ddcountry" -->DDCountry
> <!--#elif expr="$side = gullskoen" -->Gullskoen
> <!--#elif expr="$side = dans" -->Dans
> <!--#else -->DansAS
> <!--#endif -->
>
> Should I change it to percentage, brackets and the tilde, too? I’ll try
> now.
>

This is what I used:

<!--#if expr='v("side") = "dd"' -->DeDanseglade
<!--#elif expr='v("side") = "ddcountry"' -->DDCountry
<!--#elif expr='v("side") = "gullskoen"' -->Gullskoen
<!--#elif expr='v("side") = "dans"' -->Dans
<!--#else -->DansAS
<!--#endif -->


> I don’t want the legacy setting on, as I don’t like using old
> legacy stuff. If something changes, I should learn it and adapt to it
> rather than complaining and “wanting the old back” as so many does.
> However, I do think this new syntax is complicated…
>
> Your second suggestion (encoding=”none”) doesn’t have any effect. This is
> the full code, even though I don’t think it would be full of surprises:
> <!--#set encoding="none" var="errormelding" value="<p><strong>Vi beklager,
> men siden du har kommet til eksisterer ikke eller har blitt
> flyttet.</strong><br>Sørg for at du har den riktige adressen.</p>" -->
>
The output is “<p><strong> etc..” made out of &gt; and &lt; html characters
> in the code.
>

You need to set it on the <!--#echo, not on the <~--#set.


- Y

I’ve found out I’m running the latest version, 2.4.10, if that matters. I
> have cPanel, LiteSpeed, CloudLinux, PHP and a bunch of other stuff running
> over this.
>
> If you want, you can get the full code. Don’t worry, it’s not that long.
>
> Simen
>
> *Fra:* Yehuda Katz <yeh...@ymkatz.net>
> *Sendt:* ‎søndag‎, ‎14‎. ‎september‎ ‎2014 ‎06‎:‎01
> *Til:* users@httpd.apache.org
>
> On Sat, Sep 13, 2014 at 9:53 AM, Simen Mangseth <s...@live.no> wrote:
>
>>  I have two questions regarding SSI and .shtml files.
>>
>> 1: I’m using Apache 2.4, and now I can’t write like this anymore:
>>
> The simplest option might be to enable the Legacy Expression PArser:
>
> SSILegacyExprParser on
> http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilegacyexprparser
>
>
>> <!--#if expr="$SERVER_NAME = /dans.no/ || $SERVER_NAME = /dd.no/" -->
>> I’ve read that there’s a new syntax, but on the website I don’t
>> understand it, even after reading It many times. So the question is: How do
>> I transform this simple expression into the new syntax?
>>
>
> <!--#if expr="%{SERVER_NAME} =~ /dans.no/ || %{SERVER_NAME} =~ /dd.no/"
> -->
>
>
> 2: When I’m creating a variable with #set like this:
>> <!--#set var="errormelding" value="<p><strong>Text…</strong></p>" -->
>> The HTML code appears in the output. I don’t get a paragraph, or bold
>> text, as I want. How do I do this?
>>
>
> This might be a bug, since the documentation says default encoding is
> none, but I was able to reproduce it.
> You can get around it by adding encoding="none" to your echo. For your
> example:
> <!--#echo encoding="none" var="errormelding" -->
>
>
> I’m sorry, but I’ve just started learning this, so I don’t know much yet.
>>
> No need to apologize, it is really why the list is here.
>
> - Y
>
>

Reply via email to