Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

using ssi exec

Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner

View previous topic :: View next topic  
Author Message

Joined: 20 Feb 2013
Posts: 9
Location: cottonwood, az

PostPosted: Thu 06 Feb '14 21:27    Post subject: using ssi exec Reply with quote

hello all - newbie posting here

this is the first time i have attempted something like this, but i am trying to set up an if-then-else for a parameter in the URL. here is what i have done so far:

<!--#if expr='($QUERY_STRING != /teacherEmail\=mark@markyboy.com/)' -->
NO we are not marky!
<!--#else -->
YES we are marky!
<!--#endif -->

so if the url contains ?teacherEmail=mark@markyboy.com it will show one set of html, and if not, it shows another set.

i specifically choose to use != because during testing, it seemed like if the apache code testing failed for any reason, it created a permanent true condition.

it seems to be working with any test i can throw at it, but i am looking for more knowledgeable opinions than my own!

any thought or suggestions on this? yes this is probably handled better using php, but i needed a quick solution.
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6452
Location: Germany, Next to Hamburg

PostPosted: Thu 06 Feb '14 23:41    Post subject: Reply with quote

I can't do SSI, but PHP would be


if(!isset($_GET['teacher'] || $_GET['teacher'] != 'mark@markyboy.com'){
die('SORRY you can\'t access this page');
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Coding & Scripting Corner
Page 1 of 1