i had originally installed drupal on the root directory (eg. /var/www/html/ or www.example.com).

yesterday i moved it into a subdirectory to be able to access it like this www.example.com/drupal6 and made all the necessary changes on the httpd.conf, settings.php and .htaccess files.

But now when I want to access the site through www.example.com/drupal6 I get this error:

<h2>Internal Server Error </h2>
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, administrator@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

I noticed that this line RewriteBase /drupal6 on the .htaccess file is part of the problem.

what do i need to do to get this working?

thank you all.

C

Comments

andyk’s picture

Hi,

you must change the .htaccess
Take a look at this example:
http://drupal.org/upgrade/copying-your-test-site-via-GUI

like in this chapter:

    * .htaccess may need to be changed too

If you uncommented the following line in your .htaccess file in order to get rewrite rules to work properly with a subdirectory for your test site, you may need to re-comment it.

from:

# Modify the RewriteBase if you are using Drupal in a subdirectory and< /p>
<p># the rewrite rules are not working properly.</p>
<p><code>RewriteBase /drupal

to:

# Modify the RewriteBase if you are using Drupal in a subdirectory and</p>
<p><code># the rewrite rules are not working properly.</p>
<p><code># RewriteBase /drupal


And for changes in your httpd.conf the apache needs a reload

HTH

r_honey’s picture

Well, I have had success in moving sites to a sub-directory without any change what-so-ever. e.g. I often need to develop new modules for my existing sites. I just backup and restore the file-system and database from let's say example.com to localhost/example.

Most of the time, database information in settings.php is all I need to update, apart from any custom Rewrite rules if they have been added for the site.

ceci123’s picture

hi.

I got it to work...well partly. I had to modify the settings.php file to include this line:

$base_url = 'http://example.com/drupal';

However, sites created by multisite no longer works. Example I create a new site called site4 using multisite manager. When I try to access it via http://example.com/drupal/site/site4/ it returns the above error.

Forbidden
You don't have permission to access /drupal/site/site4/ on this server.

In the passed I fixed this same error on the httpd.conf file using this code below but now it does not.

  <VirtualHost *:80>
    AliasMatch ^/site/\w+/(.*) /var/www/html/drupal/$1
    DocumentRoot /var/www/html/drupal/
  </VirtualHost>

Does anyone see anything wrong with this code?

thanks

C