On Sun, May 1, 2005 12:54 pm, Evert | Rooftop Solutions said: > I'm working on a template engine, and I want my template engine to be > automaticly started when a .stl file is called from the browser. > I know this can be done with mod_rewrite, but I really need a > platform-independant solution. Has anybody some ideas on how to make it > work everywhere (preferable also on hosts where you don't have access to > configuration/shared hosting). At one end of the scale, you could write a Module for Apache, *just* like PHP is. At the other end, you could give documentation to users about using httpd.conf and/or .htaccess and Apache's ForceType directive to fire up PHP. Somewhere in the middle, I guess you could create an extension of PHP, just like php_mysql.[so|dll] and that *might* maybe give you the ability to hack enough things, including the installer/configure scripts that would do what you want... Probably not though, now that I think about it. I think the most realistic approach, honestly, is to just educate users/hosts how to easily send all your .stl scripts through PHP. If your .stl becomes even moderately popular, they'll do that, certainly *long* before they'll install your STL module to Apache. If a host won't let the webmaster use .htaccess (or whatever IIS does that's like that) then they're certainly not going to install/configure their server to use your .stl until it's wildly popular. You can't really get around that. Focus on making it the best damn Template system and making it *EASY* for most hosts to configure and QA it. To give you an analogy: In the indepdenent music industry, many artists think they want to get a Distribution deal, where some big-name company will get their music CDs into all the big-name stores like Tower. Nothing could be further from the truth, which is: Demand Drives Distribution It does one absolutely NO GOOD to have your CDs sitting on the shelf at Tower, or even Wal-Mart, if nobody ever heard of the band. The CDs will just collect dust and get shipped back at (ultimately) artist expense. In the case of .stl -- While making it easy to install/configure .stl is a laudable goal, you're simply not in a position to make it something the mass-market ultra-conservative control-panel-only webhosts will allow to be installed, no matter *HOW* easy it is. In fact, you're at the point now where such hosts will actively work to "suppress" your .stl engine, as an unproven un-tested un-trusted technology. Your effort (for now) needs to focus on the hosts who allow some degree of configuration/control to their clients. If a webmaster (or their host) can't (won't) do this in .htaccess (httpd.conf): <Files ~ *.stl> ForceType application/x-httpd-php </Files> then you need to ignore them for now, until you're an 800-pound gorilla they can't ignore :-) WARNING: I may have the <Files ...> part wrong... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php