Rewrite Drupal's File system paths to remove redundant sites/ (alternate settings.php method)

/ Published in: PHP
Save to your folder(s)

Alternate to <a href="">this method</a>. Have not yet tested.

In settings.php, put this code:

Copy this code and paste it in your HTML
  1. <?php
  2. $conf['file_directory_temp'] = 'sites/' .substr(strrchr(dirname(__FILE__), '/'), 1) .'tmp';
  3. $conf['file_directory_path'] = 'sites/' .substr(strrchr(dirname(__FILE__), '/'), 1) .'/files';
  4. ?>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.