[execution] .do extension in web pages?

I want to know what is .do extension in web pages. Is it a standard extension, or, if it's not, can we change the extension (like client-login.php to client-login.do and still run as PHP)?

Thanks.

This question is related to execution

The answer is


It is whatever it is configured to be on that particular web server. A web server could be configured to run .pl files with the php module and .aspx files with perl, although that would be silly. There are no scripts involved with most web servers, instead you'd have to look in your apache configuration files (or equivalent, if using different server software). If you have permission to edit the server config file, then you could make files ending in .do run as php, if that's what you're after.


.do comes from the Struts framework. See this question: Why do Java webapps use .do extension? Where did it come from? Also you can change what your urls look like using mod_rewrite (on Apache).


Using apache's rewrite_module can change your script extensions. Give this thread a good read.


".do" is the "standard" extension mapped to for Struts Java platform. See http://struts.apache.org/ .


I've occasionally thought that it might serve a purpose to add a layer of security by obscuring the back-end interpreter through a remapping of .php or whatever to .aspx or whatever so that any potential hacker would be sent down the wrong path, at least for a while. I never bothered to try it and I don't do a lot of webserver work any more so I'm unlikely to.

However, I'd be interested in the perspective of an experienced server admin on that notion.