Conrad Lender wrote:
On 2008-09-26 20:24, Thomas 'PointedEars' Lahn wrote:
>For example, in my_script.js.php (I would use Content Negotiation to get
rid of the security-relevant `.php' in the URI):
I wouldn't. I suppose content negotiation could also be (mis)used to
hide an extension, but it was really intended to serve alternate
representations of resources depending on the UA's capabilities and
preferences (different languages or media types). See RFC 2616.
URL rewriting would be more appropriate to hide or change file names.
URL rewriting cannot be reasonably applied to this problem: you would have
to write expressions for each script file (and have PHP parse all, which is
inefficient), or write an expression for all directories where you have to
keep all your generated script files (which is inflexible).
I might add that He who invented the Web and those who largely implemented
it disagree with you about the use of content negotiation as I do:
<http://www.w3.org/Provider/Style/URI>
<http://httpd.apache.org/docs/2.0/content-negotiation.html#naming>
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>