Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By mason on
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
Clean urls
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.
Not that
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.
Absolute url...
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.
Similar problem
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?
I have now upgraded to 4.7.4
I have now upgraded to 4.7.4 and still cannot link to a local file from the menu!
Problem fixed
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