diff --git a/fastly.rules_defaults.inc b/fastly.rules_defaults.inc
index bb15257..36b435b 100644
--- a/fastly.rules_defaults.inc
+++ b/fastly.rules_defaults.inc
@@ -20,19 +20,21 @@ function fastly_default_rules_configuration() {
 
   // 1. Reaction rule to purge Fastly cache when a comment is created, updated or deleted.
   // Purges comment page, relevant node page, and front page.
-  $configs['rules_fastly_purge_comment'] = rules_import('{ "rules_fastly_purge_comment" : {
-      "LABEL" : "Purge Fastly cache when a comment is created, updated or deleted.",
-      "PLUGIN" : "reaction rule",
-      "OWNER" : "rules",
-      "TAGS" : [ "fastly" ],
-      "REQUIRES" : [ "rules", "fastly", "comment" ],
-      "ON" : { "comment_update" : [], "comment_delete" : [], "comment_insert" : [] },
-      "DO" : [
-        { "fastly_rules_action_purge_by_urls" : { "urls" : "comment\/[comment:cid]\r\nnode\/[comment:node:nid]\r\n[site:url]" } }
-      ]
-    }
-  }');
-
+  if (module_exists('comment')) {
+    $configs['rules_fastly_purge_comment'] = rules_import('{ "rules_fastly_purge_comment" : {
+        "LABEL" : "Purge Fastly cache when a comment is created, updated or deleted.",
+        "PLUGIN" : "reaction rule",
+        "OWNER" : "rules",
+        "TAGS" : [ "fastly" ],
+        "REQUIRES" : [ "rules", "fastly", "comment" ],
+        "ON" : { "comment_update" : [], "comment_delete" : [], "comment_insert" : [] },
+        "DO" : [
+          { "fastly_rules_action_purge_by_urls" : { "urls" : "comment\/[comment:cid]\r\nnode\/[comment:node:nid]\r\n[site:url]" } }
+        ]
+      }
+    }');
+  }
+  
   // 2. Reaction rule to purge Fastly cache when a node is created, updated or deleted.
   // Purges node page and front page.
   $configs['rules_fastly_purge_node'] = rules_import('{ "rules_fastly_purge_node" : {
@@ -65,18 +67,20 @@ function fastly_default_rules_configuration() {
 
   // 4. Reaction rule to purge Fastly cache when taxonomy term is updated or deleted.
   // Purges taxonomy term page.
-  $configs['rules_fastly_purge_taxonomy_term'] = rules_import('{ "rules_fastly_purge_taxonomy_term" : {
-      "LABEL" : "Purge Fastly cache when taxonomy term is updated or deleted.",
-      "PLUGIN" : "reaction rule",
-      "OWNER" : "rules",
-      "TAGS" : [ "fastly" ],
-      "REQUIRES" : [ "rules", "fastly", "taxonomy" ],
-      "ON" : { "taxonomy_term_update" : [], "taxonomy_term_delete" : [] },
-      "DO" : [
-        { "fastly_rules_action_purge_by_urls" : { "urls" : "taxonomy\/term\/[term:tid]\r\n[term:url]" } }
-      ]
-    }
-  }');
-
+  if (module_exists('taxonomy')) {
+    $configs['rules_fastly_purge_taxonomy_term'] = rules_import('{ "rules_fastly_purge_taxonomy_term" : {
+        "LABEL" : "Purge Fastly cache when taxonomy term is updated or deleted.",
+        "PLUGIN" : "reaction rule",
+        "OWNER" : "rules",
+        "TAGS" : [ "fastly" ],
+        "REQUIRES" : [ "rules", "fastly", "taxonomy" ],
+        "ON" : { "taxonomy_term_update" : [], "taxonomy_term_delete" : [] },
+        "DO" : [
+          { "fastly_rules_action_purge_by_urls" : { "urls" : "taxonomy\/term\/[term:tid]\r\n[term:url]" } }
+        ]
+      }
+    }');
+  }
+  
   return $configs;
-}
+}
\ No newline at end of file
