diff --git a/js/linkit.dialog.js b/js/linkit.dialog.js
index 321595f..e772492 100644
--- a/js/linkit.dialog.js
+++ b/js/linkit.dialog.js
@@ -159,9 +159,9 @@ Drupal.linkit.dialog.openFileBrowser = function () {
  */
 Drupal.linkit.dialog.IMCECallback = function(file, win) {
   Drupal.linkit.dialog.populateFields({
-     path: win.imce.decode(Drupal.settings.basePath +
-         Drupal.settings.linkit.publicFilesDirectory +
-         '/' + file.relpath)
+     path: win.imce.decode(
+       (Drupal.settings.linkit.urlMethodAbsolute ? Drupal.settings.basePath : "")
+         + Drupal.settings.linkit.publicFilesDirectory + "/" + file.relpath)
   });
   win.close();
 };
diff --git a/linkit.module b/linkit.module
index dc55bbe..b5282d4 100644
--- a/linkit.module
+++ b/linkit.module
@@ -10,6 +10,12 @@
 define('LINKIT_DEFAULT_WEIGHT', 0);
 
 /**
+ * The values for "URL insert method".
+ */
+define('LINKIT_INSERT_RELATIVE', 0);
+define('LINKIT_INSERT_ABSOLUTE', 1);
+
+/**
  * Implements hook_menu().
  */
 function linkit_menu() {
@@ -290,7 +296,7 @@ function _linkit_autocomplete_search($search_string, $enabled_plugins) {
 
 /**
  * Retrieve relevant information about a URL. Specifically this function is
- * usable for internal (absolute) URL:s, but it also works for external URL:s.
+ * usable for internal (absolute) URL's, but it also works for external URL's.
  *
  * @param $url
  *   The url that should be scanned.
@@ -567,8 +573,8 @@ function _linkit_add_settings($editor) {
       $settings['publicFilesDirectory'] = variable_get('file_public_path', conf_path() . '/files');
     }
 
+    $settings['urlMethodAbsolute'] = isset($profile->data['url_method']) ? (bool) $profile->data['url_method'] : TRUE;
     $settings['autocomplete'] = array_filter($profile->data['autocomplete']);
-
     // Add caseSensitive
     $settings['autocomplete'] += array('caseSensitive' => TRUE);
     drupal_add_js(array('linkit' => $settings), 'setting');
diff --git a/plugins/export_ui/linkit_profiles.inc b/plugins/export_ui/linkit_profiles.inc
index 20d359e..120d7cc 100644
--- a/plugins/export_ui/linkit_profiles.inc
+++ b/plugins/export_ui/linkit_profiles.inc
@@ -74,13 +74,32 @@ function linkit_profiles_export_ui_form(&$form, &$form_state) {
     '#description' => t('If the user has multiple roles, the profile with lowest weight will then be assigned to the user. In general, the most permissive profile should be assigned the lowest weight.'),
   );
 
+  $form['data']['url_method'] = array(
+    '#title' => t('URL insert method'),
+    '#type' => 'radios',
+    '#title_display' => 'before',
+    '#options' => array(
+      LINKIT_INSERT_ABSOLUTE => t('Insert absolute'),
+      LINKIT_INSERT_RELATIVE => t('Insert relative'),
+    ),
+    LINKIT_INSERT_ABSOLUTE => array(
+      '#description' => t('This is the default behavior, it will insert links like %example_link.', array('%example_link' => '/drupal-site/en/node/123')),
+    ),
+    LINKIT_INSERT_RELATIVE => array(
+      '#description' => t('It will insert links like %example_link. These typically need to be formatted using !Pathologic or a similar text filter, but provides more flexibility when moving a site or using URL aliases in the output.', array('%example_link' => 'node/123', '!Pathologic' => l('Pathologic', 'http://drupal.org/project/pathologic'))),
+    ),
+    '#default_value' =>  isset($profile->data['url_method']) ? $profile->data['url_method'] : 1,
+    '#weight' => -97,
+    '#description' => t('This will have no effect on already created links.'),
+  );
+
   $form['roles'] = array(
     '#type' => 'fieldset',
     '#title' => t('Roles with access'),
     '#collapsible' => TRUE,
     '#collapsed' => TRUE,
     '#tree' => TRUE,
-    '#weight' => -97,
+    '#weight' => -96,
     '#description' => t('Roles which may use this profile. Note that if <em>authenticated user</em> is ticked, all roles (except anonymous) will have permission to this profile.'),
   );
 
diff --git a/plugins/linkit_plugins/linkit-plugin-entity.class.php b/plugins/linkit_plugins/linkit-plugin-entity.class.php
index 519e6fa..e762ddd 100644
--- a/plugins/linkit_plugins/linkit-plugin-entity.class.php
+++ b/plugins/linkit_plugins/linkit-plugin-entity.class.php
@@ -88,7 +88,12 @@ class LinkitPluginEntity extends LinkitPlugin {
     // We have to set alias to TRUE as we don't want an alias back.
     $options += array('alias' => TRUE);
 
-    return parent::buildPath($uri['path'], $options);
+    if ($this->profile->data['url_method'] == LINKIT_INSERT_ABSOLUTE) {
+      return parent::buildAbsolutePath($uri['path'], $options);
+    } else {
+      // Relative urls don't use $options.
+      return parent::buildRelativePath($uri['path']);
+    }
   }
 
   /**
diff --git a/plugins/plugin.class.php b/plugins/plugin.class.php
index 6e9bc77..868f321 100644
--- a/plugins/plugin.class.php
+++ b/plugins/plugin.class.php
@@ -72,13 +72,34 @@ abstract class LinkitPlugin implements LinkitPluginInterface {
   }
 
   /**
-   * Build an URL based in the path and the options.
+   * Build the path.
+   * We have two options here, absolute or relativ, these are based on the
+   * profile setting.
    */
   function buildPath($path, $options = array()) {
+    if ($this->profile->data['url_method'] == LINKIT_INSERT_ABSOLUTE) {
+      return $this->buildAbsolutePath($path, $options);
+    } else {
+      // Relative urls don't use $options.
+      return $this->buildRelativePath($path);
+    }
+  }
+
+  /**
+   * Contruct an absolute url.
+   */
+  function buildAbsolutePath($path, $options) {
     return url($path, $options);
   }
 
   /**
+   * Contruct a relative url.
+   */
+  function buildRelativePath($path) {
+    return $path;
+  }
+
+  /**
    * Build the search row description.
    *
    * If there is a "result_description", run it thro token_replace.
