Associating a script with a CGI
I am currently evaluating the enterprise edition for use in our web store. Could I toruble someone to explain how I can associate a script with a cgi?
CGI App Path= /var/www/vhosts/shop.lifetimemoments.com/cgi-bin/mivavm
(The CGI is outside of the document root)
I need mivavm to launch whenever the sever encounters a script with the extension .mv or .mvc
Thanks in advance
I think your question is similar to http://www.litespeedtech.com/forum/viewtopic.php?t=163
You can use a rewrite rule to archive this. you need to define a CGI context like /cgi-bin/mivavm
Then add a rewrite rule , for example
To rewrite /foo.mv to /cgi-bin/mivavm/foo.mv
lshttpd will set PATH_INFO and PATH_TRANSLATED automatically, in your script, env PATH_TRANSLATED should be the path to your script.
Thanks for your reply. :)
How would I create a rewrite rule to change:
Would there be a way to create a generic handler for all .mv files in order to avoid having a rewrite rule for each scritpt?
You don't need to create a dedicate rewrite rule for each mvc script, just a generic one can handle all scripts.
try something like:
|All times are GMT -7. The time now is 10:04 PM.|