What's with this .do extension?
January 12, 2006 2:24 AM   Subscribe

A website's pages have the extension .do Such as index.do. I presume this is a server-side technology? Which one?

PHP? SSI? How does .do operate and if it is PHP as I suspect, how does it differ. Thanks. JOn
posted by jwhittlestone to Computers & Internet (7 answers total)
 
Technically, you can easily tell PHP to use any extension you'd like:
16. Tell Apache to parse certain extensions as PHP. For example,
let's have Apache parse the .php extension as PHP. You could
have any extension(s) parse as PHP by simply adding more, with
each separated by a space. We'll add .phtml to demonstrate.

AddType application/x-httpd-php .php .phtml
(Source)

But you can also do this with ASP and ColdFusion, or any (read: most) server-side scripting languages. MetaFilter is bulit entirely in ColdFusion, but Matt uses .mefi for his extensions.

This makes it easier to mask which server side scripting language you're using to accomplish whatever. It doesn't affect the way the script performs at all. (Not sure on this, but Apache might need to be informed about non-standard file extensions, before knowing exactly what to do with them.)
posted by disillusioned at 2:34 AM on January 12, 2006


My parenthetical was for scripting languages NOT PHP, as PHP is obviously doing it with "AddType" for you, right there. Obviously, Apache solutions don't work for IIS, and I'm not sure about how to make it work o'er there, although I can't imagine it being difficult if it's at all possible.
posted by disillusioned at 2:37 AM on January 12, 2006


Best answer: This page covers the .do extension pretty well. It's a Java/Struts/JSP thing.
posted by mdevore at 2:45 AM on January 12, 2006


Just in case it wasn't clear from what disillusioned said, the extenion in the URL and the actual technology used on the server to generate the pages has no formal relationship whatsoever. Sure, there are default extensions that certain languages/technologies use, but using things like mod_rewrite or built-in language features you can dice up URLs in many ways. You could make a site have ".html" on every URL and be fully dynamically generated by PHP, for instance. Or you could have URLs ending in .php but actually be written in Perl, if you wanted to.
posted by Rhomboid at 3:40 AM on January 12, 2006


Response by poster: thanks!
posted by jwhittlestone at 3:42 AM on January 12, 2006


Technically, it could be a Java/Tapestry thing as well. I only mention it because I'm doing that sort of thing right now.
posted by Civil_Disobedient at 4:34 AM on January 12, 2006


You can also cheat and make it anything you want using Apache's httpd.conf, and provided there is no conflict :

AddType application/x-httpd-php .php .php4 .do .mefi
posted by XiBe at 5:16 AM on January 12, 2006


« Older Name that tune   |   Who are the 21st century Muses? Newer »
This thread is closed to new comments.