diff --git a/src/MyWebLog/Maintenance.fs b/src/MyWebLog/Maintenance.fs index 544de4f..8413504 100644 --- a/src/MyWebLog/Maintenance.fs +++ b/src/MyWebLog/Maintenance.fs @@ -384,7 +384,11 @@ module Backup = // Restore web log data printfn "- Restoring web log..." - do! data.WebLog.Add restore.WebLog + // v2.0 backups will not have redirect rules; fix that if restoring to v2.1 or later + let webLog = + if isNull (box restore.WebLog.RedirectRules) then { restore.WebLog with RedirectRules = [] } + else restore.WebLog + do! data.WebLog.Add webLog printfn "- Restoring users..." do! data.WebLogUser.Restore restore.Users diff --git a/src/admin-theme/redirect-list.liquid b/src/admin-theme/redirect-list.liquid index 232ead0..721c862 100644 --- a/src/admin-theme/redirect-list.liquid +++ b/src/admin-theme/redirect-list.liquid @@ -18,9 +18,9 @@ {% if redir_count > 0 -%}
-
From
-
To
-
RegEx?
+
From
+
To
+
RegEx?
@@ -29,7 +29,7 @@ {% for redir in redirections -%} {%- assign redir_id = "redir_" | append: forloop.index0 -%}
-
+
{{ redir.from }}
{%- assign redir_url = "admin/settings/redirect-rules/" | append: forloop.index0 -%} @@ -55,8 +55,8 @@
-
{{ redir.to }}
-
{% if redir.is_regex %}Yes{% else %}No{% endif %}
+
{{ redir.to }}
+
{% if redir.is_regex %}Yes{% else %}No{% endif %}
{%- endfor %} @@ -68,4 +68,9 @@
+

+ This is an advanced feature; please + read and understand the documentation on this feature before adding rules. +