Hi, all,

fellow list member Caleb Gray recently shared a tip with me off-list which
i feel is worth passing on: extensionless CGI scripts under Apache.

For example:

http://fossil.wanderinghorse.net/repos/test/blah

"blah" is a CGI script which looks like:

#!/path/to/fossil
repository: /path/to/libfossil.fsl

what makes it work is this .htaccess file:

Options +ExecCGI
SetHandler cgi-script

Some hosters may allow users to hide CGIs behind a .html extension:

# doesn't work on my hoster :(
AddHandler cgi-script .html
DirectoryIndex index.html

(@Caleb: do you have a workaround for that one?)

There's on tiny caveat which maybe someone can tell me a workaround for
(without mod_rewrite please because my hoster installs rewrite rules
already to redirect subdomains and new rules tend to misinteract with
those):

This works:
http://fossil.wanderinghorse.net/repos/test/blah

but this does not:
http://fossil.wanderinghorse.net/repos/test/blah/

(notice the trailing slash)

That is indeed "correct" behaviour, but it bugs me nonetheless because blah
"looks like" a directory and i would like it to behave that way regardless
of whether there is a /path/part after it or not.

Happy Fossiling!

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to