Hi,
Sorry if this has been coverned - tried a few searches on google and
this list's archives to no avail.
I'd like to move my server over to a templating system.
Specifically, what I'd like to do is to be able to execute one named CGI
(probably under FastCGI) where Apache cannot find an existing target
file (ideally with named extensions like .html but that's not so
important) after URL-path translation phase.
eg /var/www/ contains:
template.cgi
index.tmpl
shops.tmpl
specialcase.html
anotherspecial.php
morespecial.cgi
-----
requests to the webserver should handled thus:
http(s)://webserver/index.html -> template.cgi
http(s)://webserver/shops.html -> template.cgi
http(s)://webserver/wibble.html -> template.cgi
http(s)://webserver/specialcase.html -> specialcase.html
http(s)://webserver/anotherspecial.php -> anotherspecial.php
http(s)://webserver/morespecial.cgi -> morespecial.cgi
This will allow template.cgi to look at the request and decide if the
request was X.html and X.tmpl exists, to run template.cgi on X.tmpl.
template.cgi will handle the error page when required.
Special cases exceptions can be handled just by having the target file
present.
I'll also need to ideally have this work on any sub path too
http(s)://webserver/wibble/index.html -> template.cgi
http(s)://webserver/wibble/special.html -> wibble/special.html if
wibble/special.html exists
with an easy way to disable it en-bloc for certain paths.
Sounds like a rewrite rule, but I've always struggled with those and
really don't know how to attack this.
Any pointers, even "google for blah" would be most appreciated.
TIA
Tim
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [email protected]
" from the digest: [email protected]
For additional commands, e-mail: [email protected]