[support] how to handle internal links

Jason Flatt drupal at oadae.net
Tue Jul 4 19:40:24 UTC 2006


On Tuesday 04 July 2006 12:22, Ray Zimmerman wrote:
> Unfortunately, the link you suggest would be broken on my dev server
> (drupal doesn't modify the link). It only works on a server that has
> drupal installed at the web server's document root.
>
> I need something that converts "/node/99" to "/dev/node/99" on my dev
> server and "/node/99" on my production server, based on where my
> drupal install happens to be in the web server document root. Btw,
> menus do work properly no matter where the server is installed. A
> menu that points to node/99 will point to /dev/node/99 on my dev
> server and /node/99 on the production server. I'm just looking for a
> way to do that same translation for internal links embedded in content.

Try it w/o the leading slash. If your $base_url is setup correctly (and 4.7 is 
supposed to handle that for you), it should work with either path. If that 
still doesn't work, try setting and uncommenting the $base_url variable in 
your sites/default/settings.php file.

>
> Isn't this an issue for lots of people? I find I'm always making
> copies of my site (throw my whole installation in a new directory and
> point it to a duplicate of the database) to play around with new
> features. Doesn't everyone do this?  :-)  How can I do it without it
> breaking all the internal links in my content?
>
> 	Ray
>

-- 
Jason Flatt
http://www.oadae.net/
Father of Six:  http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis, 
9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005)
Linux User:     http://www.sourcemage.org/
Drupal Fanatic: http://drupal.org/


More information about the support mailing list