[semi OT] htaccess file question

Mike Bonner bonnmike at gmail.com
Sun Jul 19 10:40:07 EDT 2015


I think you can override the behavior using an htaccess so that your irev
files use the new server.  (assuming you can the system is set up to allow
overrides)  The problem is, knowing where the correct engine is located so
that you can set up your htaccess to point to it.  To find this out, I set
up an lc script that checks some environmental info.

SCRIPT_NAME: /cgi-bin/livecode-server
SCRIPT_FILENAME: /usr/local/cpanel/cgi-sys/livecode-server-6.6.2


So.  Hopefully, if you set up an .htaccess file something like the
following, it will work.

    Options ExecCGI
    AddHandler livecode-script .irev
    Action livecode-script /cgi-bin/livecode-server


I just did a quick test by changing livecode-server (in an htaccess I
just created) to something nonsensical, and it fails as I'd expect, so
overrides are indeed allowed.



Just did a test.  Gong from lc scripts down to the old server would
require changes to your pages (because the <?lc is not recognized) but
going the other direction works fine. I set up an .irev file, changed
my .htaccess as above, and it works like a champ.

This is my test script..


<?rev
put the version & "<br><pre>"
repeat for each key tKey in $_SERVER
put merge("[[tKey]]: [[ $_SERVER[tkey] ]] [[cr]]")
end repeat
put "</pre>"

?>


On Sun, Jul 19, 2015 at 6:21 AM, <jbv at souslelogo.com> wrote:

> Hello list
> I have different apps used by clients that make requests to LC scripts on
> a server. All this stuff is a few years old and all scripts urls are in
> the .irev format. I would like to use instead new .lc scripts without
> having to rewrite, recompile and redistribute the apps.
> Can I use the htaccess file to have all url requests ending with .irev
> triggering the .lc scripts instead (similar scripts but using the most
> recent engine) ?
> If yes, how to ?
> The main reason behind that is that I've been told that .irev scripts use
> the legacy engine, which is plagued with random bugs...
>
> Thanks in advance
> jbv
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list