$HTTP["host"] == "votresite.tld" { server.document-root = "/home/votresite/public_html/" # Disable directory listings dir-listing.activate = "disable" # Deny access to template files url.access-deny += ( ".ss" ) static-file.exclude-extensions += ( ".ss" ) # Deny access to SilverStripe command-line interface $HTTP["url"] =~ "^/framework/cli-script.php" { url.access-deny = ( "" ) } # Disable FastCGI in assets directory (so that PHP files are not executed) $HTTP["url"] =~ "^/assets/" { fastcgi.server = () } # Rewrite URLs so they are nicer url.rewrite-once = ( "^/.*\.[A-Za-z0-9]+.*?$" => "$0", "^/(.*?)(\?|$)(.*)" => "/framework/main.php?url=$1&$3" ) # Show SilverStripe error page server.error-handler-404 = "/framework/main.php" }