Moving a Drupal installation to a subdirectory Ok, I've got a Drupal install with a lot of links inside various nodes. All of these links are relative.

The problem is that if they're going to say, an image or a pdf in the /sites/default/files directory, they stop working.

Let me give an example:

There is a link in a node like this:

/sites/default/files/image1.png


www.livesite.com/sites/default/files/image1.png works

www.domain.com/devsite/sites/default/files/image1.png does not work

How do I (easily) switch the links to work in such a way? Do I have to do an .htaccess edit, or is there something in the Drupal settings for this? This is for Drupal 7
You can use the module Pathologic that acts as a filter on your text formats (Full HTML, Filtered HTML) and basically rewrites URL's which are parts of fields depending the site configuration and Pathologic settings.

You can for example set Processed URL format to Path relative to server root (/foo/bar) and for the All base paths for this site, you fill in the different website URL's.