DevHeads.net

Postings by Adam

SSI conditionals AFTER apache auth?

Evening everyone,

I'm trying to make it so that only certain elements on a web page are
visible to users logged in, and are otherwise not displayed using
mod_include flow control
<https://httpd.apache.org/docs/current/mod/mod_include.html#flowctrl>.
The only way I've been able to do that so far is to detect the cookie
that the apache auth sets, which works sort of. Of course if I just
manually set the cookie in my browser then the stuff shows and just
confuses the whole setup I put.

SSI conditionals not accepting "||" or "&&"

Good afternoon all,

I've been tinkering with setting up SSI's in some HTML of mine, and
one thing I'm trying to do is have the server decide if it should post
a signup link, or display a logged-in users name (using perl cgi
includes).

"Define" directive is ALWAYS parsed

Hello,
I'm working on a way of making specific content available only under
certain circumstances, and I believe the best way to go about this is
to use the "Define" directive, then do some stuff within "<IfDefine
...>" wrappers. The problem is, no matter what kind of conditional
stuff I put around the Define line, it is always parsed.
Example:
<If "%{HTTP_USER_AGENT} =~ /curl/>
Define myvar
</If>
With the above, the "myvar" parameter will always be defined for every
request, regardless of user-agent.