Currently i'm trying to installing a drupal 7 installation in a subfolder of another drupal public_html folder, but it doesnt seem to work. I am getting a redirect loop error in chrome. I already modified the .htaccess in the parent drupal installation to ignore the sub-folder and i also set the $base_url in the sub-directory drupal installation.
When I do this, provided I have a clean install, I do not modify anything. Take the domain
http://diw.ifi.uio.no/, where Drupal is installed in both
/www/gruppe01/, etc. (I just create the number of subdomains I need for various experiments). My DocumentRoot is set to be
/www/. I just direct my browser to
http://diw.ifi.uio.no/ for the main site, and
http://diw.ifi.uio.no/gruppe01/ for the first subfolder site, etc. and it works - just like that.
Have you tried starting with a clean install and just install Drupal in the subfolder using the standard install procedure without changing
.htaccess? (While not always necessary, I recommend that you have
$base_url set correctly in the site's
In my experience, Drupal works fine out of the box when installed in a subdirectory of a vhost. The fact that there is another Drupal in the
DocumentRoot does not make this any different, as long as each Drupal site has its own
.htaccess, it will not try to read the
.htaccess in any superior directory.
If possible, it's better to setup the new site in it's own virtualhost, e.g a subdomain site1.example.com, site2.example.com etc..
If you want to install in a subfolder under a single vhost, you will find other odd configuration may be required (e.g embedded image paths etc.. )
If you want to go down the install in subfolder route, you've done some of the special conf and may just require
RewriteBase in .htaccess to be set to the subfolder path for that site.
Okay after fiddling around some more. I finally solved the issue. First off the .htaccess in the subdirectory override's the root's .htaccess. so that means you dont have to worry about the root's .htaccess file
Therefore, anything that needs to be adjusted is within the subdirectory and you shouldn't need to touch anything in the root directory where you have your other drupal installed.
What i did was:
- Comment out line 81 and line 82 of the subdirectory drupal installation .htaccess file.
- Un-comment the line 94 RewriteBase to where you have your subdirectory drupal installed
- Add in the $drupal_base variable in your sites/default/settings.php file to fix any file path issues you might have.
If this worked for you let me know! +1! :)