diff --git a/search404.admin.inc b/search404.admin.inc
index 58ae05b..e308fc1 100644
--- a/search404.admin.inc
+++ b/search404.admin.inc
@@ -31,7 +31,7 @@ function search404_settings() {
     '#type' => 'checkbox',
     '#title' => t('Do a Google CSE Search instead of a Drupal Search when a 404 occurs'),
     '#description' => t('Requires Google CSE and Google CSE Search modules to be enabled.'),
-    '#attributes' => module_exists('google_cse') ? array()  : array('disabled' => 'disabled'),
+    '#attributes' => module_exists('google_cse') ? array() : array('disabled' => 'disabled'),
     '#default_value' => variable_get('search404_do_google_cse', FALSE),
   );
   $form['search404_do_google_cse_adv'] = array(
@@ -45,7 +45,7 @@ function search404_settings() {
     '#type' => 'checkbox',
     '#title' => t('Do a "Search by page" Search instead of a Drupal Search when a 404 occurs'),
     '#description' => t('Requires "Search by page" module to be enabled.'),
-    '#attributes' => module_exists('search_by_page') ? array()  : array('disabled' => 'disabled'),
+    '#attributes' => module_exists('search_by_page') ? array() : array('disabled' => 'disabled'),
     '#default_value' => variable_get('search404_do_search_by_page', FALSE),
   );
   // Custom search path implementation (for Search API integration #1076190)
@@ -110,6 +110,23 @@ function search404_settings() {
     '#title' => t('Use OR between keywords when searching'),
     '#default_value' => variable_get('search404_use_or', FALSE),
   );
+  $form['advanced']['search404_do_custom_search'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Do a "Search" with custom path instead of a Drupal Search when a 404 occurs'),
+    '#description' => t('Redirect the user to a Custom search path to be entered below. Can be used to open a view with path parameter.'),
+    '#default_value' => variable_get('search404_do_custom_search', FALSE),
+  );
+  $form['advanced']['search404_custom_search_path'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Custom search path'),
+    '#description' => t('The custom search path: example: myownsearch/@keys or myownsearch?txt_s=@keys. The token "@keys" will be replaced with the search keys from the URL.'),
+    '#default_value' => variable_get('search404_custom_search_path', 'search/@keys'),
+    '#states' => array(
+      'visible' => array(
+        ':input[name="search404_do_custom_search"]' => array('checked' => TRUE),
+      ),
+    ),
+  );
   $form['advanced']['search404_use_search_engine'] = array(
     '#type' => 'checkbox',
     '#title' => t('Use auto-detection of keywords from search engine referer'),
diff --git a/search404.variable.inc b/search404.variable.inc
index 988a84a..8ba17d7 100644
--- a/search404.variable.inc
+++ b/search404.variable.inc
@@ -13,8 +13,7 @@ function search404_variable_info($options) {
     'type' => 'string',
     'title' => t('Custom page title', array(), $options),
     'default' => '',
-    'description' => t('You can enter a value that will be displayed as the '
-        . 'title of the webpage e.g. "Page not found".', array(), $options),
+    'description' => t('You can enter a value that will be displayed as the title of the webpage e.g. "Page not found".', array(), $options),
     'required' => FALSE,
     'group' => 'search404',
     'localize' => TRUE,
@@ -25,8 +24,17 @@ function search404_variable_info($options) {
     'type' => 'string',
     'title' => t('Custom page text', array(), $options),
     'default' => '',
-    'description' => t('You can enter a custom text message that can be '
-        . 'displayed at the top of the search results, HTML formatting can be used.', array(), $options),
+    'description' => t('You can enter a custom text message that can be displayed at the top of the search results, HTML formatting can be used.', array(), $options),
+    'required' => FALSE,
+    'group' => 'search404',
+    'localize' => TRUE,
+    'multidomain' => TRUE,
+  );
+  $variables['search404_custom_search_path'] = array(
+    'type' => 'string',
+    'title' => t('Custom path', array(), $options),
+    'default' => '',
+    'description' => t('path you can enter which will be redirected to the custom search page.', array(), $options),
     'required' => FALSE,
     'group' => 'search404',
     'localize' => TRUE,
