diff --git a/metatags_quick.admin.inc b/metatags_quick.admin.inc
index 584368d..2a8e971 100644
--- a/metatags_quick.admin.inc
+++ b/metatags_quick.admin.inc
@@ -338,3 +338,357 @@ function _metatags_quick_field_attach($entity_type, $bundle, $meta_name) {
   }
   field_create_instance($instance);
 }
+
+/**
+ * Display all pathes that have metagtags defined for them
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags($form, $form_state) {
+  // get current language and module path
+  global $language;
+  $module_path = drupal_get_path('module', 'metatags_quick');
+  // grab language list
+  $languages = _metatags_quick_language_list();
+  // create table form
+  $form['new_path_based'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('New path'),
+    '#collapsible' => FALSE,
+    '#attached' => array(
+      'js' => array($module_path . '/js/admin.js'),
+      'css' => array($module_path . '/css/admin.css'),
+    ),
+    'new_path' => array(
+      '#tpye' => 'container',
+      '#prefix' => '<div style="float:left">',
+      '#suffix' => '</div><div style="clear:both;"> </div>',
+      'path' => array(
+        '#type' => 'textfield',
+        '#title' => t('Path:'),
+        '#description' => t('Enter path starting without a leading "/". "*" can be used as a wildcard at the end of a path.'),
+        '#prefix' => '<div style="float:left;">',
+        '#suffix' => '</div>',
+      ),
+      'language' => array(
+        '#type' => 'select',
+        '#title' => 'Select language',
+        '#options' => $languages,
+        '#default_value' => $language->language,
+        '#prefix' => '<div style="float:left; margin-left: 40px;">',
+        '#suffix' => '</div><div style="clear:both;"> </div>',
+      ),
+      'new_path_submit' => array(
+        '#type' => 'submit',
+        '#value' => t('Create'),
+        '#attributes' => array('style' => 'margin-bottom: 20px;')
+      )
+    )
+  );
+  $form['path_based'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Manage Paths'),
+    '#collapsible' => FALSE
+  );
+  $header = array(
+    'path' => array('data' => t('Path'), 'field' => 'p.path'),
+    'language' => array('data' => t('Language'), 'field' => 'p.lang', 'width' => '10%'),
+    'operations' => array('data' => t('Operations'), 'width' => '30%', 'colspan' => 2),
+  );
+  $query = db_select('metatags_quick_path_based', 'p')->extend('PagerDefault')->extend('TableSort');
+  $result = $query
+   ->fields('p')
+   ->limit(50)
+   ->orderByHeader($header)
+   ->execute();
+  // set up to fill options array
+  $destination = drupal_get_destination();
+  $options = array();
+  // fill options array
+  foreach ($result as $path) {
+    $options[] = array(
+      'path' => l($path->path, $path->path, array('query' => $destination)),
+      'language' =>  $languages[check_plain($path->lang)],
+      'edit' =>
+        l(t('edit'), 
+           'admin/config/search/metatags_quick/path_based_metatags/edit', 
+           array('query' => array('path' => $path->path, 'lang' => $path->lang, 'destination' => $destination['destination']))),
+      'delete' =>
+        l(t('delete'), 
+           'admin/config/search/metatags_quick/path_based_metatags/delete', 
+           array('query' => array('path' => $path->path, 'lang' => $path->lang, 'destination' => $destination['destination'])))
+    );
+  }
+  // add created table
+  $form['path_based']['existing'] = array(
+    '#theme' => 'table',
+    '#header' => $header,
+    '#rows' => $options,
+    '#empty' => t('No content available.'),
+    '#attributes' => array('id' => 'path_based_metatags'),
+  );
+  // add default page
+  $form['path_based']['pager'] = array('#markup' => theme('pager', array('tags' => NULL)));
+  // return listing form
+  return $form;
+}
+
+/**
+ * Validates the existance of a valid path provided by the user. Path has to be
+ * at least 2 characters long.
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_validate($form, $form_state) {
+  if(isset($form_state['values']['path'])) {
+    // create path and empty entity
+    if(strlen(trim($form_state['values']['path'])) < 2) {
+        form_set_error('path', t('Illegal path entered.'));
+    }
+  }  
+}
+
+/**
+ * Handles the creation of a new path by redirecting to 
+ * metatags_quick_admin_path_based_metatags_edit() which autocreates new
+ * entities if they don't exist yet for a given path and language.
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_submit($form, &$form_state) {
+  if(isset($form_state['values']['path'])) {
+    // redirect to existing form
+    $destination = drupal_get_destination();
+    $form_state['redirect'] = array(
+      'admin/config/search/metatags_quick/path_based_metatags/edit',
+      array(
+       'query' => array(
+         'lang' => check_plain($form_state['values']['language']),
+         'path' => check_plain($form_state['values']['path']),
+         'destination' => $destination['destination'])
+       )
+    );
+  }
+}
+
+/**
+ * Displays a form to the user allowing him to edit the path and all the fields
+ * of the metatag entity associated with that path
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_edit($form, $form_state) {
+  $controller = new DrupalDefaultEntityController('metatags_path_based');
+  $entity_id = db_select('metatags_quick_path_based', 'm')
+    ->fields('m', array('id'))
+    ->condition('lang', check_plain($_GET['lang']))
+    ->condition('path', check_plain($_GET['path']))
+    ->execute()
+    ->fetchField();
+  if (!$entity_id) {
+    $entity_id = db_insert('metatags_quick_path_based')
+      ->fields(array('lang' => check_plain($_GET['lang']), 'path' => check_plain($_GET['path'])))
+      ->execute();
+  }
+  $entities = $controller->load(array($entity_id));
+  $form_state['entity'] = $entities[$entity_id];
+  field_attach_form('metatags_path_based', $entities[$entity_id], $form, $form_state);
+  //
+  $form['path'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Edit path'),
+      '#description' => t('Enter path starting without a leading "/". "*" can be used as a wildcard at the end of a path.'),
+      '#default_value' => check_plain($_GET['path']),
+      '#weight' => '-50'
+  );
+  $form['old_path'] = array(
+      '#type' => 'hidden',
+      '#value' => check_plain($_GET['path'])
+  );
+  $form['old_lang'] = array(
+      '#type' => 'hidden',
+      '#value' => check_plain($_GET['lang'])
+  );
+  //
+  $form['submit'] = array(
+    '#value' => t('Submit'),
+    '#type' => 'submit',
+    '#weight' => '49'
+  );
+  $form['cancel'] = array(
+    '#type' => 'submit',
+    '#value' => t('Cancel'),
+    '#weight' => 20,
+    '#submit' => array('metatags_quick_admin_path_based_metatags_edit_cancel'),
+    '#weight' => '50'
+  );
+  return $form;
+}
+
+/**
+ * Returns back to the metatags listing
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_edit_cancel($form, &$form_state) {
+  if(isset($_GET['destination']))
+    $form_state['redirect'] = $_GET['destination'];
+}
+
+/**
+ * Checks if the user has submitted a valid path. Path must be at least 2
+ * characters long
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_edit_validate($form, $form_state) {
+  if(isset($form_state['values']['path'])) {
+    // create path and empty entity
+    if(strlen(trim($form_state['values']['path'])) < 2) {
+        form_set_error('path', t('Illegal path entered.'));
+    }
+  }
+}
+
+/**
+ * Updates the metatags entity for a given path after the user has submitted the
+ * form. Also updates the path if it has been altered.
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_edit_submit($form, $form_state) {
+  // abort if there is no valid entity
+  if (!$form_state['entity']) {
+    form_set_error();
+    drupal_set_message(t('Wrong path'), 'error');
+    return;
+  }
+  // update path if it has been altered
+  if($form_state['values']['path'] != $form_state['values']['old_path']) {
+    // check if there isn't already a path like the new path
+    $entity_id = db_select('metatags_quick_path_based', 'm')
+      ->fields('m', array('id'))
+      ->condition('lang', check_plain($form_state['values']['old_lang']))
+      ->condition('path', check_plain($form_state['values']['path']))
+      ->execute()
+      ->fetchField();
+    // if not continue
+    if(!$entity_id) {
+    db_update('metatags_quick_path_based')
+      ->fields(array(
+        'path' => check_plain(trim($form_state['values']['path'])),
+      ))
+      ->condition('id', $form_state['entity']->id)
+      ->execute();
+    } else {
+      // otherwise abort with error message
+      form_set_error('path', t('Path already exists!'));
+      return;
+    }
+  }
+  // update entity fields
+  $entity = $form_state['entity'];
+  entity_form_submit_build_entity('metatags_path_based', $entity, $form, $form_state);
+  field_attach_update('metatags_path_based', $entity);
+  // display message and redirect
+  drupal_set_message('Meta tags updated', 'status');
+  if(isset($_GET['destination']))
+    $form_state['redirect'] = $_GET['destination'];
+  else 
+    $form_state['redirect'] = FALSE;
+}
+
+/**
+ * Display a delet confirmation for the user allowing him to choose to proceed 
+ * or abort the removal.
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_delete($form, $form_state) {
+  // display delete confirmation
+  if(isset($_GET['path'])) {
+    $form['intro'] = array(
+      '#type' => 'item',
+      '#markup' => t('Do you really want to delete the following path:'),
+    );
+    $form['item'] = array(
+      '#type' => 'item',
+      '#markup' => $_GET['path'],
+      '#prefix' => '<ul><li>',
+      '#suffix' => '</ul></li>'
+    );
+    $form['note'] = array(
+      '#type' => 'item',
+      '#markup' => t('This action cannot be undone.'),
+    );
+    $form['actions'] = array(
+      '#type' => 'actions',
+      'delete' => array(
+        '#type' => 'submit',
+        '#value' => t('Delete'),
+        '#submit' => array('metatags_quick_admin_path_based_metatags_delete_submit')),
+      'cancel' => array(
+        '#type' => 'submit',
+        '#value' => t('Cancel'),
+        '#limit_validation_errors' => array(),
+        '#submit' => array('metatags_quick_admin_path_based_metatags_delete_cancel')));
+    return $form;
+  }
+}
+
+/**
+ * Deletion has been confirmed. Item will be deleted if it is a valid one.
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_delete_submit($form, &$form_state) {
+  // fetch and delete
+  $controller = new DrupalDefaultEntityController('metatags_path_based');
+  $entity_id = db_select('metatags_quick_path_based', 'm')
+    ->fields('m', array('id'))
+    ->condition('lang', check_plain($_GET['lang']))
+    ->condition('path', check_plain($_GET['path']))
+    ->execute()
+    ->fetchField();
+  if (!$entity_id) {
+    drupal_set_message(t('Path not found!'), 'error');
+  } else {
+    metatags_path_based_delete($entity_id);
+  }
+}
+
+/**
+ * Cancels the deletion and should return to the listing
+ *
+ * @param type $form
+ * @param type $form_state
+ */
+function metatags_quick_admin_path_based_metatags_delete_cancel($form, &$form_state) {
+  if(isset($_GET['destination']))
+    $form_state['redirect'] = $_GET['destination'];
+}
+
+/**
+ * creates a select list compatible list of languages keyed by language tags and
+ * with localized language values.
+ *
+ * @global type $language
+ * @return array $languages
+ */
+function _metatags_quick_language_list() {
+  global $language;
+  $languages = array();
+  foreach(language_list() as $lang) {
+    $languages[$lang->language] = t($lang->name);
+  }
+  return $languages;
+}
diff --git a/metatags_quick.module b/metatags_quick.module
index 3fe5e64..c131353 100644
--- a/metatags_quick.module
+++ b/metatags_quick.module
@@ -20,6 +20,31 @@ function metatags_quick_menu() {
     'access arguments' => array('administer metatags_quick'),
     'file' => 'metatags_quick.admin.inc',
   );
+  $items['admin/config/search/metatags_quick/path_based_metatags'] = array(
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('metatags_quick_admin_path_based_metatags'),
+    'title' => 'Path-Based Metatags',
+    'access arguments' => array('edit metatags_quick'),
+    'file' => 'metatags_quick.admin.inc',
+    'type' => MENU_LOCAL_TASK,
+    'weight' => 50
+  );
+  $items['admin/config/search/metatags_quick/path_based_metatags/edit'] = array(
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('metatags_quick_admin_path_based_metatags_edit'),
+    'title' => 'Path-Based Metatags',
+    'access arguments' => array('edit metatags_quick'),
+    'file' => 'metatags_quick.admin.inc',
+    'type' => MENU_CALLBACK
+  );
+  $items['admin/config/search/metatags_quick/path_based_metatags/delete'] = array(
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('metatags_quick_admin_path_based_metatags_delete'),
+    'title' => 'Path-Based Metatags',
+    'access arguments' => array('edit metatags_quick'),
+    'file' => 'metatags_quick.admin.inc',
+    'type' => MENU_CALLBACK
+  );
   $items['admin/config/search/metatags_quick/settings'] = array(
     'page callback' => 'drupal_get_form',
     'page arguments' => array('metatags_quick_admin_settings'),
@@ -158,6 +183,29 @@ function metatags_quick_page_build(&$page) {
       ->fields('pv', array('id'))
       ->execute()
       ->fetchField();
+    // if no excact match found - do wildcard search
+    if ($path_based_id == 0 && strstr($_GET['q'], "/")) {
+      $parts = explode("/", $_GET['q']);
+      // iterate through parts
+      for($i = count($parts) - 1; $i > 0; $i--) {
+        // create path
+        $path = "";
+        for($j = 0; $j < $i; $j++) {
+          $path .= $parts[$j] . "/";
+        }
+        // do wildcard query
+        $path_based_id = db_select('metatags_quick_path_based', 'pv')
+          ->condition('lang', $language->language)
+          ->condition('path', $path . "*")
+          ->fields('pv', array('id'))
+          ->execute()
+          ->fetchField();
+        // check for results
+        if($path_based_id > 0) {
+          break;
+        }
+      }
+    }
     if ($path_based_id > 0) {
       $controller = new DrupalDefaultEntityController('metatags_path_based');
       $path_entities = $controller->load(array($path_based_id));
@@ -429,4 +477,33 @@ function _metatags_quick_path_based_page() {
   return !is_array($router_item['page_arguments'])
     || count($router_item['page_arguments']) == 0
     || !($router_item['page_arguments'][0] instanceof stdClass);
-}
\ No newline at end of file
+}
+
+/**
+ * Deletes a metatags path based entity
+ *
+ * @param type $entity
+ * @return type
+ */
+function metatags_path_based_delete($entity) {
+  if(!is_object($entity)) {
+    $controller = new DrupalDefaultEntityController('metatags_path_based');
+    $entity = db_select('metatags_quick_path_based', 'm')
+      ->fields('m', array('id'))
+      ->condition('id', (int)$entity)
+      ->execute()
+      ->fetchField();
+    if($entity)
+      $entity = array_pop(array_values(entity_load('metatags_path_based', array($entity))));
+  }
+  if(!$entity || !is_object($entity) || !isset($entity->path))
+    return false;
+  // do the deletion
+  field_attach_delete('metatags_path_based', $entity);
+  db_delete('metatags_quick_path_based')
+    ->condition('id', $entity->id)
+    ->condition('path', $entity->path)
+    ->condition('lang', $entity->lang)
+    ->execute();
+  drupal_set_message(t('Path "'.$entity->path.'" and metatags deleted'), 'status');
+}
