From a8a532106e9d27602a08b9d46d4a380bee1d9886 Mon Sep 17 00:00:00 2001 From: Ludwig Lehnert Date: Thu, 17 Apr 2025 19:53:50 +0200 Subject: [PATCH] added blog entry; added robots.txt and sitemap --- www/.htaccess | 2 ++ www/blog.php | 2 ++ www/blog/0.json | 4 ++++ www/blog/1.json | 12 ++++++++++++ www/blog/1.svg | 1 + www/index.php | 2 +- www/lib/blog.php | 6 ++++-- www/robots.txt | 3 +++ www/sitemap.php | 39 +++++++++++++++++++++++++++++++++++++++ 9 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 www/blog/1.json create mode 100644 www/blog/1.svg create mode 100644 www/robots.txt create mode 100644 www/sitemap.php diff --git a/www/.htaccess b/www/.htaccess index 7ac65d1..8b79b3c 100644 --- a/www/.htaccess +++ b/www/.htaccess @@ -5,6 +5,8 @@ RewriteEngine On # ------------------------------------------- RewriteRule ^blog/([^/]+)/?$ /blog.php?id=$1 [L,QSA] +RewriteRule ^sitemap\.xml$ /sitemap.php + # ---------------------------------------------------- # 2. Rewrite /lib/* or /blog/* to /error.php?code=404 # with 404 response code (internal rewriting) diff --git a/www/blog.php b/www/blog.php index 6346017..072a275 100644 --- a/www/blog.php +++ b/www/blog.php @@ -29,6 +29,8 @@ $rand_send_comment = mt_rand() % 5; + keywords) ?>"> + <?= $blog->title ?>