Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: better rewrite rules for Lighttpd example #451

Closed
shadowlmd opened this issue Sep 30, 2017 · 0 comments
Closed

Suggestion: better rewrite rules for Lighttpd example #451

shadowlmd opened this issue Sep 30, 2017 · 0 comments
Milestone

Comments

@shadowlmd
Copy link

shadowlmd commented Sep 30, 2017

I suggest to include these rules into Lighttpd example (doc/webserver_sampleconfigs/lighttpd-site.conf):

url.rewrite-once = (
  "^/([0-9a-f]{8,})$" => "/index.php?/view/$1",
  "^/([0-9a-f]{8,})/(?:r|raw)$" => "/index.php?/view/raw/$1",
  "^/((?!index\.php|static|favicon\.ico|robots\.txt|sitemap\.xml|google(.+)\.html).+)$" => "/index.php?/$1"
)

First is required for short forms like https://example.com/abc123de, second for short raw form like https://example.com/abc123de/r or https://example.com/abc123de/raw and the last is adopted Apache rewrite rule from .htaccess that works for everything else. All tested and work perfectly on Lighttpd 1.4.35.

@shadowlmd shadowlmd changed the title Suggestion: better rewrite rules for lighttpd example Suggestion: better rewrite rules for Lighttpd example Sep 30, 2017
@claudehohl claudehohl added this to the 0.13.0 milestone Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants