I am using Drupal 7. The website I am on was configured previously. My goal is to add an external link to a page. However, i am having trouble. Every link I add to any page is read as a relative link. For example, if I have the following code:

<a href="http://www.google.com/">Google</a>

The URL in the browser becomes: dev.mysite.com/#http://www.google.com But, I want the URL to be http://www.google.com

First, Can i fix this using PHP? Second, Is this something the Pathauto Module is responsible for, or maybe the Rewrite module? Both are enabled on the site Lastly, is it a mod rewrite issue? If so, how would i fix it?

  • How are you adding this link? Is there a link field or are you adding it to the node body? – BetaRide Jun 30 '12 at 9:22
  • No, there is not a link field. It is being added to the node body using the anchor tag. <a href="">text</a>. – Mandeep Jun 30 '12 at 21:59
  • Pathauto would not be responsible for touching any kind of links inside a node body. – Dave Reid Jul 8 '12 at 19:59

You must have some kind of text filter that is acting on your text see what filters are applied here: admin/config/content/formats

Or you are using a WYSIWYG editor to add the link. If that is ckeditor, you have to set relative links to "Other" rather than http in the link editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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