^ is the regex anchor for start of line. Scriptaliasmatch uses regular expressions. The starting place of the documentation is at
https://httpd.apache.org/docs/2.4/mod/mod_alias.html
$1 is a back reference to the first matched section between ()'s, So whatever (.*) matches. Which should be anything. I don’t know why they have to be different, I don't even remember if I tried it with the first method when I tested this long ago.
Are you posting to the second program? Are you sending back the right headers? There are a lot of moving parts in persistent CGI, and it isn't very well documented that I could find. I ended up bowing to the pressure and reworking my processes to be stateless. Anything that needed to be tracked from one program to the next used session variables.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Rob Dixon
Sent: Thursday, December 06, 2018 1:00 PM
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] Apache directive syntax
As I have said in an earlier post, I have been running a persistent CGI application on a V5R1 system for ten or more years using the IBM original HTTP server. I have now transferred it to a V5R3 system and must run it under Apache. My static pages work correctly but I am having problems with my dynamic persistent CGI pages. The first screen is displayed correctly with data retrieved from the database, so I assume that there are no security problems, yet, when I click on Enter to access the second screen, I get an error, the actual error depending on which particular version of my config file I use.
I imagine that the problem is of my making, but, having reacted to various kind suggestions, as yet I have achieved nothing, and I have to admit that I really don't know what I am doing. Yet, having searched for many hours for adequate documentation of the syntax of Apache directives, I cannot find anything that answers my questions.
For instance, what is the effect of putting *^* at the beginning of a ScriptAlias or ScriptAliasMatch line? What is the difference between a ScriptAliasMatch statement that ends with $1 and another that ends $1.pgm?
https://www.easy400.net/cgidev2o/persista.htm states -
“The *ScriptAliasMatch *directive for executing persistent CGI programs MUST HAVE the following format ScriptAliasMatch /cgidev2p/(.*) /qsys.lib/cgidev2.lib/$1 The following format WOULD NOT WORK:
ScriptAliasMatch /cgidev2p/(.*).pgm /qsys.lib/cgidev2.lib/$1.pgm”
but neither work for me.
Can anyone please point me at documentation of the Apache syntax that explains all this?
Many thanks,
Rob
--
Rob Dixon
www.erros.co.uk
www.boarstall.com
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/web400.
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.