I've created a static page on my site that I'd like to have linked to in my navigation menu.

The problem is that whatever text string I enter into the "path" field gets appended to 'http://mysite.com/mybasedir/?q=' instead of being interpreted as a standalone url.

Is there a way to simply create an absolute link to my static page? or even a relative link that would be appended to 'http://mysite.com/mybaseurl/' instead of 'http://mysite.com/mybaseurl/?q=' ?

Comments

tangent’s picture

I might be partly wrong, but I believe the solution you are looking for is to enable "Clean urls" (in the settings admin area). That will get rid of the "/?q=" in links. Then simply use "/mypath" in your url alias. This worked for me.

che_guevara’s picture

I have a legacy page, in mydrupalsite.com/old/blah.php . However, if I add
this link to menu, I'm going to get "page not found" error for
mydrupalsite.com?q=/old/blah.php

Is there a way to stick an absolute URL to the page on the same domain without Drupal treating it as a query parameter?
Thanks.

gdip’s picture

I would probably create a separate block for this with 'all' html enabled and simply put it there. If you want better flexibility enable php though I cannot see why that should be necessary here.

wings’s picture

I have a similar problem. I want to link to a local file on our internal network, but the path keeps getting appended on to the end of ?q.

Putting the links in a separate block and writing in straight html works, but the way our site is set up the only person who would be able to do that would be the administrator. We were hoping that all users would be able to add links to wherever, and not have to resort to using html (they could use tinymce rich text).

Has anyone got any ideas of how to get absolute urls to work from the menu?

wings’s picture

I have now upgraded to 4.7.4 and still cannot link to a local file from the menu!

wings’s picture

I managed to fix the problem by using adding a new variable to the variables table. Full details are found here:

http://drupal.org/node/97524

Brian