Code: Alles auswählen
# Current document root
server.document-root = "/var/www"
# CSS and JS files expire after one year
$HTTP["url"] =~ "^/(_css|_js)/(.*)" {
expire.url = ( "" => "access plus 1 years" )
}
# Images and fonts expire after one month
$HTTP["url"] =~ "^/(_img|fonts|files)/(.*)" {
expire.url = ( "" => "access plus 1 months" )
}
$HTTP["url"] =~ "\.(gif|ico|jpe?g|png|svgz?|webp|eot|font.css|otf|ttc|ttf|woff)$" {
setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
}
# redirect to trailing slash if no extension
$HTTP["url"] !~ "(([.][a-z0-9]{1,})|(/))$" {
url.redirect = (
"^(.*[^/])$" => "$1/"
)
}
url.rewrite-if-not-file = (
"^/(redaxo|files)/(.*)" => "$0",
"^/google(.*).html*" => "$0",
"^/sitemap\.xml$" => "/index.php?rexseo_func=googlesitemap",
"^/sitemap\.json$" => "/index.php?rexseo_func=googlesitemap&mode=json",
"^/robots\.txt$" => "/index.php?rexseo_func=robots",
"^/(.*)/?$" => "/index.php"
)
compress.filetype = ("text/plain","text/css","text/xml","text/javascript", "application/x-javascript")