Topic: Drupal and htaccess
For a few months I've been running Juicebox galleries successfully on my Drupal8 site. I have the galleries located at:
public_html/juiceboxgalleries
There is a config.php in this directory, then subdirectories for each gallery which have a subdirectory for images, one for thumbnails and the config.xml file uploaded from my PC. Cool.
I've been trying to find a way to allow my content types on the site to BOTH upload images or find images on the site if they are already there. Drupal8 comes with ckeditor built in. You can add the IMCE editor, which provides for file browsing both on your web site and your local PC. However, the IMCE file browsing seems to be limited to just public directories ... which are usually something like /drupal8/sites/default/files ... (bear with me). It looked to me like IMCE could also be tricked into browsing a private directory if I used Drupal8's setting file to identify one. So a couple hours ago, I made /jboxgalleries into a private directory. Little knowing as you will see.
Doing this didn't fix the IMCE issue ... it is still limited to the public directories. So I gave up on this and put settings.php back where it was with no private directory.
Fine: except now regression testing my galleries, only the first out of 50+ worked. The rest could not find the config.xml file.
After going through cpanel, and resetting cache numerous times both in Drupal and in my browser, I stumbled across an .htaccess file in my jboxgalleries directory. Renamed this and suddenly my galleries all worked again. It was protecting the directory (private it thought) from being accessed by apache. Why the first gallery worked is beyond me. Not sure anyone else would stumble into this but thought I'd post it: watch for stray htaccess files created behind the scenes by cpanel.
Also occurs to me that it might be a good idea to put jboxgallery directory in the sites/default/files area so that it could be served up as public. That way you could use all your nice jpgs in content types on your Drupal page and browse them with IMCE while creating the content. Easy enough to move all the files in one swell foop, but I'd also need to spend a couple of hours individually changing the embedded text (the baseurl) to point to the new area.