|
|
@@ -0,0 +1,41 @@
|
|
|
+#
|
|
|
+{
|
|
|
+ debug
|
|
|
+ skip_install_trust
|
|
|
+}
|
|
|
+
|
|
|
+{$SERVER_NAME:localhost} {
|
|
|
+
|
|
|
+ # Enable compression (optional)
|
|
|
+ encode zstd br gzip
|
|
|
+
|
|
|
+ # Add trailing slash for directory requests
|
|
|
+ @canonicalPath {
|
|
|
+ file {path}/index.php
|
|
|
+ not path */
|
|
|
+ }
|
|
|
+ redir @canonicalPath {path}/ 308
|
|
|
+
|
|
|
+ @unapages path_regexp ^/page/(.*)$
|
|
|
+ rewrite @unapages /page.php?i={re.unapages.1}
|
|
|
+
|
|
|
+ @unamodules path_regexp ^/m/(.*)$
|
|
|
+ rewrite @unamodules /modules/index.php?r={re.unamodules.1}
|
|
|
+
|
|
|
+ @unastorage path_regexp ^/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)
|
|
|
+ rewrite @unastorage /storage.php?o={re.unastorage.1}&f={re.unastorage.2}
|
|
|
+
|
|
|
+ @unaMissing {
|
|
|
+ not file
|
|
|
+ not path */
|
|
|
+ path_regexp una ^/(.+)$
|
|
|
+ }
|
|
|
+ rewrite @unaMissing /r.php?_q={re.una.1}&{query}
|
|
|
+
|
|
|
+ try_files {path} {path}/index.php {path}/index.html
|
|
|
+
|
|
|
+ # FrankenPHP!
|
|
|
+ @phpFiles path *.php
|
|
|
+ php @phpFiles
|
|
|
+ file_server
|
|
|
+}
|