Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:

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

<VirtualHost *:80>
    ServerAlias *
    DocumentRoot /usr/share/drupal6
    RewriteEngine On
    RewriteOptions inherit

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

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, and then all other URLs are relative to that. (Note: 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.

share|improve this question

1 Answer 1

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?)

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.