diff options
author | Adam T. Carpenter <atc@53hor.net> | 2022-12-26 15:43:57 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2022-12-26 15:43:57 -0500 |
commit | 4f41d064c9cbf0647e07d012dd538c92648f7a61 (patch) | |
tree | 2400a8f5d52b7fb1f394c5e30de59ca6842c8ab9 | |
parent | 7ac270782d15ec54a3c6f0f74bd4be6f530d04e5 (diff) | |
download | www-4f41d064c9cbf0647e07d012dd538c92648f7a61.tar.xz www-4f41d064c9cbf0647e07d012dd538c92648f7a61.zip |
fix: redirect links to posts/ files to index router
Prevents permalinks on the web from getting pages without nav or CSS
(header).
-rw-r--r-- | usr/local/etc/lighttpd/conf.d/redirect.conf | 2 | ||||
-rw-r--r-- | usr/local/etc/lighttpd/lighttpd.conf | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/etc/lighttpd/conf.d/redirect.conf b/usr/local/etc/lighttpd/conf.d/redirect.conf new file mode 100644 index 0000000..7b0923c --- /dev/null +++ b/usr/local/etc/lighttpd/conf.d/redirect.conf @@ -0,0 +1,2 @@ +server.modules += ( "mod_redirect" ) +url.redirect = ( "^/posts/(.+).php$" => "/$1" ) diff --git a/usr/local/etc/lighttpd/lighttpd.conf b/usr/local/etc/lighttpd/lighttpd.conf index 4d98d5b..00c347d 100644 --- a/usr/local/etc/lighttpd/lighttpd.conf +++ b/usr/local/etc/lighttpd/lighttpd.conf @@ -4,6 +4,7 @@ include "conf.d/dirlisting.conf" include "conf.d/mime.conf" include "conf.d/cgi.conf" include "conf.d/access.conf" +include "conf.d/redirect.conf" index-file.names += ("index.php") server.error-handler-404 = "/index.php" server.document-root = "/var/www" |