0

I've installed Apache2 and Drupal6 and necessary dependencies on Ubuntu 10.10 (using apt-get install drupal6). When I initially set up Drupal, I accessed it through a URL like this:

http://mydomain.com/drupal6/node

I subsequently set up the virtual host in Apache, like this:

<VirtualHost *:80>
    ServerAdmin webmaster@mydomain.com
    ServerName mydomain.com
    ServerAlias mydomain.com *.mydomain.com
    DocumentRoot /usr/share/drupal6
    RewriteEngine On
    RewriteOptions inherit
</VirtualHost>

So now I can get to all my Drupal stuff with this URL:

http://mydomain.com/node

This is all well and good. However, the URLs for the home link in the upper left and the URLs in the Drupal navigation menu still have the /drupal6/ part in them. So, for example, if I click the Administer link, it goes to http://mydomain.com/drupal6/admin, and then all other URLs are relative to that. (Note: http://mydomain.com/admin works just fine too.)

How can I get rid of that /drupal6/ part in the URLs? I can't find anything in settings.php or in the admin screens to change it.

Kristopher Johnson
  • 315
  • 1
  • 6
  • 12

1 Answers1

0

OK, I figured this out about 30 seconds after posting the question (after an hour of hair-pulling before posting the question).

In /usr/share/drupal6/.htaccess, comment out this line:

RewriteBase /drupal6

and uncomment out this line:

RewriteBase /

(I missed this because the command grep drupal6 * skips .htaccess. Who was the genius who came up with "hidden" files?)

Kristopher Johnson
  • 315
  • 1
  • 6
  • 12
  • With command line expansion, * will only expand to *. and not .* -- this is a function of the shell and not really a deficiency in grep. – bogeymin Dec 13 '10 at 10:52