I'm using wampserver and I'm trying to redirect a visitor to an external url (which in turn will eventually send them back to another page on my drupal-site).

My site on wampserver is called localhost/testing and I use

drupal_goto(www.example.com, array(
  'external' => TRUE,
  'absolute' => TRUE,

However, the url I get redirected to is localhost/testing/www.example.com instead of www.example.com

2 Answers 2


You need whole URL like http(s)://www.example.com


Dont use file path like localhost/example.com/

please user localhost/examplecom/ or localhost/example-com/

rename the folder name example.com to example-com or examplecom

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.