diff --git a/bin/werc.rc b/bin/werc.rc index 709d7b5..0975792 100755 --- a/bin/werc.rc +++ b/bin/werc.rc @@ -81,6 +81,8 @@ fn werc_exec_request { } cd $werc_root + if(~ $#perm_redir_to 1) + perm_redirect $perm_redir_to f=();t=() for(i in $perm_redir_patterns) { if(~ $#f 0) diff --git a/bin/wercconf.rc b/bin/wercconf.rc index 083db4f..1e0f4a5 100644 --- a/bin/wercconf.rc +++ b/bin/wercconf.rc @@ -1,9 +1,11 @@ # To be used from config files fn conf_perm_redirect { if(~ $#* 1) - perm_redirect $1 - if not + perm_redir_to=$1 + if not { perm_redir_patterns=($perm_redir_patterns $1 $2) + conf_hide_paths $1 # XXX Will hide paths even if replacement string is the same as matched sctring. + } } fn conf_hide_paths { diff --git a/lib/sitemap.tpl b/lib/sitemap.tpl index 5eb5b11..cf2e042 100644 --- a/lib/sitemap.tpl +++ b/lib/sitemap.tpl @@ -39,20 +39,22 @@ fn listDir { if(test -f $d/_werc/config) . ./$d/_werc/config - echo '