diff --git a/facetapi_pretty_paths.info b/facetapi_pretty_paths.info
index 644996d..ae0f94d 100644
--- a/facetapi_pretty_paths.info
+++ b/facetapi_pretty_paths.info
@@ -9,6 +9,7 @@ files[] = plugins/facetapi/url_processor_pretty_paths.inc
 files[] = plugins/base_path_provider/facetapi_pretty_paths_base_path_provider.inc
 files[] = plugins/base_path_provider/facetapi_pretty_paths_adapter_base_path_provider.inc
 files[] = plugins/base_path_provider/facetapi_pretty_paths_default_base_path_provider.inc
+files[] = plugins/base_path_provider/facetapi_pretty_paths_alias_base_path_provider.inc
 files[] = plugins/coders/facetapi_pretty_paths_coder_default.inc
 files[] = plugins/coders/facetapi_pretty_paths_coder_taxonomy.inc
 files[] = plugins/coders/facetapi_pretty_paths_coder_taxonomy_pathauto.inc
diff --git a/facetapi_pretty_paths.module b/facetapi_pretty_paths.module
index 9daf651..7233419 100644
--- a/facetapi_pretty_paths.module
+++ b/facetapi_pretty_paths.module
@@ -219,6 +219,13 @@ function facetapi_pretty_paths_admin_form($form, &$form_state) {
     }
     $form['searcher'][$id . '_options']['base_path_provider'] = $base_path_providers_form_item;
   }
+  $form['facetapi_pretty_paths_alias_base_url'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Use path alias in base URL.'),
+      '#default_value' => variable_get('facetapi_pretty_paths_alias_base_url', FALSE),
+      '#description' => t("Try to search for path alias in base URL. The implementation rewrites all inbound links and calls drupal_lookup_path() multiple times. May cause side effects and performance issues. Meant to be used with alias base path provider."),
+    );
+  // Try to find a source path for the last valid alias.
   return system_settings_form($form);
 }
 
@@ -235,6 +242,7 @@ function facetapi_pretty_paths_ctools_plugin_type() {
   return $plugins;
 }
 
+
 /**
  * Implements hook_facetapi_pretty_paths_base_path_provider().
  */
@@ -254,6 +262,13 @@ function facetapi_pretty_paths_facetapi_pretty_paths_base_path_provider() {
         'description' => 'Relies on the FacetapiAdapter::getSearchPath() method to generate the base path. This one is likely overridden by SearchApiFacetapiAdapter::getSearchPath() or ApacheSolrFacetapiAdapter::getSearchPath().',
       ),
     ),
+    'alias' => array(
+      'handler' => array(
+        'label' => t('Alias base path provider'),
+        'class' => 'FacetApiPrettyPathsAliasBasePathProvider',
+        'description' => 'Same as default but respect base path alias. Path alias in base URL option or other URL rewrite is required.',
+      ),
+    ),
   );
   // Allow other modules to alter the base path provider definitions.
   drupal_alter('facetapi_pretty_paths_base_path_provider', $base_path_providers);
@@ -352,3 +367,30 @@ function facetapi_pretty_paths_coder_callback($callback, $args) {
     return call_user_func_array(array($instance, $callback), $args);
   }
 }
+
+/**
+ * Implements hook_url_inbound_alter().
+ */
+function facetapi_pretty_paths_url_inbound_alter(&$path, $original_path, $path_language) {
+  if (!variable_get('facetapi_pretty_paths_alias_base_url', FALSE)) {
+    return;
+  }
+
+  $alias = $path;
+  $url = explode('/', $path);
+
+  // Try to find a source path for the last valid alias.
+  $found = FALSE;
+  foreach (array_reverse($url) as $key => $component) {
+    if ($base = drupal_lookup_path('source', $alias)) {
+      $found = TRUE;
+      break;
+    }
+    $component = "/" . $component;
+    $alias = str_replace($component, '', $alias);
+  }
+
+  if ($found && preg_match('|^' . $alias . '/(.*)|', $path, $matches)) {
+    $path = $base . '/' . $matches[1];
+  }
+}
\ No newline at end of file
