Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mrsinguyen/404816 to your computer and use it in GitHub Desktop.
Save mrsinguyen/404816 to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_url_outbound_alter() - from URL Alter module
*/
function YOURMODULE_url_outbound_alter(&$path, &$options, $original_path) {
// Rewrite paths for rices4peru.com
if ($_SERVER['HTTP_HOST'] == "www.rices4peru.com") {
$options['absolute'] = TRUE;
$options['base_url'] = 'http://www.drupal.rices2peru.com';
}
}
?>
@sanglt
Copy link

sanglt commented Jun 7, 2010

Drupal 7 only ;).

Drupal 6 have function custom_url_outbound_alter() but it very slow and teriable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment