Depending on where you're trying to use it, and if you can use PHP, you might try
That sounds like a possible fix but I do not have control of the domain and subdomain names.
thanks,
Nestor :-)On Wed, Nov 18, 2009 at 7:10 PM, Shai Gluskin <shai@content2zero.com> wrote:
I'm not sure I totally understand your question, but I'll tell you what works consistently for me with simplest possible set up on the server and no .htaccess or mod_rewrite complications. This just works.
I always have my Drupal root at the domain root. For example: http://www.example.com.
If I need to put the site in a subdirectory, I will always create a sub-domain. For example, if the Drupal directory is at: example.com/drupal, I will create a subdomain called drupal.example.com that transforms example.com/drupal into a domain root (drupal.example.com).
One of the reasons I do this is that I find root-relative links to be the most stable for links inside text areas. So links that I create inside nodes or custom blocks to other places on the same site I'll make them root-relative which is like, "/custompath" or "/longer/custompath".
Note however when you are in Drupal admin screens (as opposed to a node body or custom block) you don't put the forward slash at the beginning. Drupal itself doesn't have a hard time keeping track of where its root directory is and beginning with a forward slash will not work.
I've had trouble with truly relative links created inside nodes, such as a link like "custompath" or "node/1". Root-relative links take the guesswork out. But the downside of root-relative is that they always go to the domain root, even if the Drupal root is in a sub-directory. And so that is why I use the subdomain trick in those situations because the sub-domain essentially changes the location of the domain root.
This system makes moving the site to another server, another domain, or another directory on the same server, really, really simple.
Hope this makes some sense to you.
This isn't necessarily the "best" way, it's the way I've simplified things for myself so I don't have to be too much of a server geek and I get consistent results.
ShaiOn Wed, Nov 18, 2009 at 7:41 PM, Néstor <rotsen@gmail.com> wrote:
--I have create a block that has some basic html links like
<a href="/nestor/scroller612/as_dept/as_main">Admin Services</a>
This works but if I were to move my drupal site this will not work.
If I were to set the link as follows it will not work
<a href="as_dept/as_main">Admin Services</a>
Now what is the proper way to point to a link ina drupal page?
How do you tell it to use the drupal site path + the location of the link you want to access?
Thanks,
Nestor :-)
--
--
[ Drupal support list | http://lists.drupal.org/ ]