404 Error Serving a /libraries page in Drupal 8
It took some time to figure out why I kept seeing a 404 error (page not found) on http://www.mysite.com/libraries. The issue seemed to only present itself on our Acquia environments. Ultimately I realized that there was a conflict due to having a “libraries” directory in the document root of the site (e.g., /docroot/libraries).
It was a quick fix after realizing the cause of the problem; I added this to my .htaccess file, above the other index.php rewrite rules.
1 2 |
RewriteCond %{REQUEST_URI} ^/libraries/?$ RewriteRule ^ index.php [L] |
The reason this wasn’t happening on my local machine is because I’m using nginx locally for this particular website; the .htaccess file isn’t used.