path: root/src/ellinika
authorSergey Poznyakoff <>2015-01-10 18:14:14 (GMT)
committer Sergey Poznyakoff <>2015-01-10 18:14:14 (GMT)
commit1c22a86e073d57c4b35ac5b7ffea07aa541141c4 (patch) (unidiff)
treec90f3fc758b5dfc2f8e8fd64f2ef0a87343b3e50 /src/ellinika
parent2b99881a880d101ae32a94b3d1e0a792224cb74c (diff)
Make it possible to use apache rewrite rules to create nice cgi urls
Example: configure with options: --without-script-suffix --without-script-dir, and add the following to the Apache virtual host configuration: RewriteEngine on RewriteRule ^/dict(.*) /cgi-bin/dict.cgi$1 [H=cgi-script] RewriteRule ^/nea(.*) /cgi-bin/nea.cgi$1 [H=cgi-script] RewriteRule ^/conj(.*) /cgi-bin/conj.cgi$1 [H=cgi-script] All cgi's will then be referred to directly, as in: http://ellinika/dict?lang=pl. * (REAL_SCRIPT_SUFFIX): New subst var New options --with-script-suffix, --with-script-dir * src/cgi-bin/.gitignore: Remove cgi * src/cgi-bin/ Rename installed scm's in place * src/ellinika/cgi.scm4 (cgi-program-name): Suffix can be empty. * xml/ =SCRIPT_SUFFIX= always begins with dot
Diffstat (limited to 'src/ellinika') (more/less context) (ignore whitespace changes)
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ellinika/cgi.scm4 b/src/ellinika/cgi.scm4
index 51f9570..28adea1 100644
--- a/src/ellinika/cgi.scm4
+++ b/src/ellinika/cgi.scm4
@@ -127,7 +127,7 @@ ifelse(IFACE,[CGI],[
127(define-public (cgi-program-name prog) 127(define-public (cgi-program-name prog)
128 (string-append 128 (string-append
129 (substring cgi-script-name 0 (string-rindex cgi-script-name #\/)) "/" 129 (substring cgi-script-name 0 (string-rindex cgi-script-name #\/)) "/"
130 prog ".SCRIPT_SUFFIX")) 130 prog ifelse(SCRIPT_SUFFIX,,,"SCRIPT_SUFFIX")))
131 131
132(define-public (expand-template explist template) 132(define-public (expand-template explist template)
133 "(expand-template EXPLIST TEMPLATE) 133 "(expand-template EXPLIST TEMPLATE)

Return to:

Send suggestions and report system problems to the System administrator.