diff --git a/web/public/tfm.html b/web/public/tfm/files.html
similarity index 97%
rename from web/public/tfm.html
rename to web/public/tfm/files.html
index 59f2b21..f7a488d 100644
--- a/web/public/tfm.html
+++ b/web/public/tfm/files.html
@@ -3,7 +3,7 @@
- File Manager | Tanabata
+ Files | Tanabata File Manager
@@ -28,7 +28,7 @@
-Tanabata File Manager
+TFM Files
diff --git a/web/public/tfm/index.html b/web/public/tfm/index.html
new file mode 100644
index 0000000..2c00afc
--- /dev/null
+++ b/web/public/tfm/index.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+ Tanabata File Manager
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Welcome to Tanabata File Manager!
+
+ Files or tags?
+
+
+
+
diff --git a/web/server/web-server.go b/web/server/web-server.go
index 848f637..52f6201 100644
--- a/web/server/web-server.go
+++ b/web/server/web-server.go
@@ -175,7 +175,10 @@ func main() {
}
public_fs := http.FileServer(http.Dir("/srv/www/tanabata"))
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != "/" && path.Ext(r.URL.Path) == "" {
+ if r.URL.Path == "/tfm" {
+ r.URL.Path += "/"
+ }
+ if r.URL.Path[len(r.URL.Path)-1] != '/' && path.Ext(r.URL.Path) == "" {
r.URL.Path += ".html"
}
public_fs.ServeHTTP(w, r)