Skip to content

Instantly share code, notes, and snippets.

@felipelavinz
Created May 25, 2018 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipelavinz/fa7678c88d302bccd50c0525d3ecffcb to your computer and use it in GitHub Desktop.
Save felipelavinz/fa7678c88d302bccd50c0525d3ecffcb to your computer and use it in GitHub Desktop.
$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"
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment