Skip to content

Instantly share code, notes, and snippets.

@mjau-mjau
Created April 2, 2017 11:28
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 mjau-mjau/65f7d7698ef2358ee6fdb7691f0a54a2 to your computer and use it in GitHub Desktop.
Save mjau-mjau/65f7d7698ef2358ee6fdb7691f0a54a2 to your computer and use it in GitHub Desktop.
X3 Lighttp config
# Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists
url.rewrite-if-not-file = (
"(.+)\.(html|json|xml|atom|rss)$" => "$1/"
)
# Rewrite any calls to /render to the X3 image resizer
url.rewrite-once = (
"^render/." => "app/parsers/slir/"
)
# Rewrite routes to X3 application index.php if they are non-existent files/dirs
url.rewrite-if-not-file = (
"^(.*)/$" => "index.php?/$1/"
)
@mjau-mjau
Copy link
Author

This file is incomplete.

@mjau-mjau
Copy link
Author

From another X3 user with X3 inside dir /x3/:

url.rewrite-if-not-file = (
"^/x3(/[^?]*)\.(html|json|xml|atom|rss|rdf|txt)+(\?(.*))?$" => "/x3/index.php?$1&$4",
"^/x3/render(/.*)$" => "/x3/app/parsers/slir/index.php?$1",
"^/x3(/[^?]*)(\?(.*))?$" => "/x3/index.php?$1&$3"
)
url.rewrite-once = (
"^/x3/(panel|public|content)+($|/.*)" => "$0"
)
$HTTP["url"] =~ "^/x3/config.*" {
url.access-deny = ("")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment