1

I have made a block for a footer which contains 2 simple links. The html code is as follows:

<div class="privacyTerms">
<a href="privacy">PRIVACY-POLICY</a>&nbsp;&nbsp; <a href="terms">TERMS &amp; CONDITIONS</a>
</div>

The links work fine as long as i click on them while being anywhere on the website BESIDES the user profile. BUT, as soon as i try to click the links while in my user profile, instead of the URL pointing to "/privacy" or "/terms", the system appends a "/user/" path before the link. So the link becomes as follows: "/user/privacy" and "/user/terms". If i try to access it i get a Access denied. I cannot for the life of me! figure out why this is happening..... What am i missing? Drupal 7

Thanks for your help!!

2 Answers 2

0

Modify your href from

<a href="privacy">

and

<a href="terms">

to

<a href="/privacy">

and

<a href="/terms">

Notice the slash. That means the path is relative to your base url instead of being relative to your current path.

0

Use href value like this

<a href="<?php echo url('terms');?>">TERMS &amp; CONDITIONS</a>

It will work everywhere.

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.