Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Created May 25, 2018 17:46

Revisions

  1. felipelavinz created this gist May 25, 2018.
    23 changes: 23 additions & 0 deletions lighttpd.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    $HTTP["host"] =~ "sitios.ucsc.cl|www.sitios.ucsc.cl|admision.ucsc.cl|www.admision.ucsc.cl|fscu.ucsc.cl|rinie.ucsc.cl|foobar.ucsc.cl" {
    # Configuraciónes Basicas
    server.document-root = "/var/www/ucsc-minisitios/htdocs"
    server.error-handler-404 = "/index.php?error=404"

    $HTTP["url"] =~ "^/xmlrpc.php" {
    url.access-deny = ( "" )
    server.error-handler-404 = "/403.php"
    }

    # Rewrite
    url.rewrite-final = (
    "^/(.*)?/?files/([^?]*)" => "wp-includes.php/ms-files?file=$2",
    "^/(wp-admin|wp-content)/(.*)" => "$0",
    "^/(/wp-admin/.*)" => "$1",
    "^/([_0-9a-zA-Z-]+/)?(wp-json.*)" => "/index.php/$2",
    "^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "$2",
    "^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "$2",
    "^/(wp-login.php(.*))" => "$0",
    "(\?.*)$" => "index.php$1",
    "." => "index.php"
    )
    }