1

Until recently, I've never used Drupal in a subfolder before, and having followed the directions in the .htaccess file as well as this page, I'm unable to get it working.

Drupal projects will be stored in the following structure:

localhost/drupal/project1
localhost/drupal/project2
...
localhost/drupal/project10

Here is where I am:

  1. Per the .htaccess file I uncommented the rewrite rule for subdirectories so that it reads RewriteBase /drupal/project1

  2. Per the link above I changed the httpd.conf file to read AllowOverride All so .htaccess overrides would work.

Yes, the rewrite module is installed and working. Yes, I've restarted Apache several times and cleared Drupal cache. I've even tried different variations of the rewrite base. Nothing.

Am I missing a step somewhere?

  • Did you ran this command "a2enmod rewrite"? – Pushpinder Rana Jun 4 '14 at 3:28
  • yes, rewrite is enabled (This is CentOS so, the LoadModule line for rewrite in uncommented and working) – blue928 Jun 4 '14 at 3:33
  • 1
    I have at least a dozen sites that place the Drupal root in a subfolder of the web root. In my experience, there is nothing special about it. Clean URLs are enabled automatically after a clean install, provided Apache mod rewrite is enabled. I've never had to do anything special, (such as editing the default .htaccess that is installed as part of a clean install). This is whether the Drupal root is in a subfolder of the web root, or not. Have you tried to install without changing the default `.htaccess? – Free Radical Jun 4 '14 at 7:09
  • 1
    Do clean URLs work on this server in the root directory? @FreeRadical You also need Options Indexes and AllowOverride All in the Apache config for the Drupal DOCROOT for clean URLs to work. I literally just had this problem on a site an hour ago. – mpdonadio Jun 5 '14 at 1:56
0

Locally, I only work with sub folders. The times I had problems with getting clean URL's working correctly, it was the rewritebase setting (part of the mod rewrite class of settings) that was not set correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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