Move Drupal to sub-directory
One of my production site have just been installed Drupal in the root directory, i.e. visitor browse to www.mysite.com will be brought to Drupal main page. Anyway, our Drupal configuration and contents are not ready yet, so we decide to pull it back - create other few pages as temporary, visitor will see this instead when browse to www.mysite.com. And then, move all Drupal files to new sub-directory, called "drupal", that we can access by pointing to www.mysite.com/drupal. This will let us have a test environment - on a live server, and continue development work at background.
Some problems we have found, solved are noted here,
Problem
- except Drupal main page which is now at www.mysite.com/drupal, others pages return error 404 - page not found
Solution - 2 things you need to do
- update variable $base_url
in sites/default/settings.php to the sub directory Drupal is in, .e.g. for this case
$base_url = 'http://www.mysite.com/drupal';
This changes the links that Drupal generates so they point to the correct location. - move .htaccess also
you need a copy of old .htaccess file you were using, which is in root director. Just copy it to the sub directory Drupal is moved to
Thanks to these sources, read more
Recent comments
1 week 6 days ago
6 weeks 5 days ago
6 weeks 5 days ago
6 weeks 6 days ago
8 weeks 3 days ago
8 weeks 4 days ago
8 weeks 6 days ago
9 weeks 11 hours ago
11 weeks 5 days ago
18 weeks 3 days ago