I first ran the install.php when drupal was reachable as example.org/drupal/, then later I changed the Apache configuration to make it into a virtual host. Now that I can reach the site at example.org, the problem is, all links available on that page still have /drupal/ in them, and result in 404.

I have tried uncommenting "RewriteBase /" in the .htaccess file, and restarting Apache. Nothing changed. There is nothing of use in the settings.php file for the site.

There are a lot of web pages that seem to solve this, but they are either for older versions of Drupal or just don't work.

I can force the correct URL's down Drupal's throat with an additional rule in the Apache configuration to rewrite the URL without the /drupal/ link, but come on, there must be a less hackish way to fix this.

Also of note, I'm trying this out on Arch Linux, so some file paths might be different. But this is a configuration issue, not a file path issue.

EDIT: for clarity, what I want is all links to show as example.org/blah without the /drupal/ being automatically inserted.

1 Answer 1


The entry in the .htaccess file you should uncomment is the /drupal one:

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  RewriteBase /drupal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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