summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/local/etc/lighttpd/conf.d/redirect.conf2
-rw-r--r--usr/local/etc/lighttpd/lighttpd.conf1
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"