…teEngine on RewriteBase "/var/www/htdocs" RewriteCond "$1.php" -f RewriteCond "$1.html" !-f RewriteRule "^(.*).html$" "$1.php" </Directory> Discussion This example uses an often-overlooked feature of mod_rewrite by taking advantage of the order of execution of the ruleset. In par…
…is to correctly implement HTTP content-negotiation from scratch. While most web scripting languages (PHP, Python, etc.) and frameworks provide access to the value of the HTTP headers and thus, to the 'Accept:' header, choosing the appropriate return type is far from trivial. The …